Skip to content

ShadowrunnerLeon/ftrackerd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ftrackerd

Descripton

ftrackerd is a daemon that monitors file size changes using fstat () and sends reports to the client over UDP.

Descripton of libraries

  • createdaemon.h - implementation of the daemon creation function.
  • logLib.h - functions for working with logs and configs.
  • HashTable.h - functions for working with a hash table.

How to use

Before using it, you need to setup create_test_files.py

Example of running the program:

sudo ./ftrackerd 80 5

The first parameter is responsible for the port, the second - for the waiting time of the daemon. The daemon can be started without parameters, then the default port value is 16680, and the waiting time is 1 second.

To make sure that the daemon is running, enter the following command in the terminal:

ps -ef | grep ./ftrackerd

Then you can run udp_client on another device. The main condition is that the devices must be connected to a local network. Example of running udp_client:

./udp_client track /tmp/file

When running udp_client, the command to address the daemon is specified. There are four of them in total:

hello       - display greeting
track       - display file status(changed or not changed)
track file1 - display file status(changed or not changed) of file1
help        - display this commands

If you updated the config while the daemon was running, you need to send it a SIGHUP signal using this command in the terminal:

sudo killall -HUP ./ftrackerd

To disable the daemon, enter:

sudo killall ./ftrackerd

To delete test files, setup delete_test_files.py

P.S

You can fill in the config with your values. The first line is responsible for the number of tracked files, and the following lines are the paths to those files.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published