Skip to content

Installing on a Generic PC

Akashdeep Dhar edited this page Jul 21, 2020 · 3 revisions

Note

The x86_64 instruction set is considered when talking about Generic PC. Both the script and executable binary are supported in all kinds of GNU/Linux distributions while running SYSMON as a service is supported only on GNU/Linux distributions having systemd as their init process.

Executing as an application

You may run SYSMON as an application on Generic PC with either of the following two ways.

Using the packaged binary

  • Download the latest binary from the releases page.
  • Make the binary executable by running sudo chmod +x WebStationSYSMON.
  • Execute the binary with ./WebStationSYSMON -p 6969 -6. This runs the webserver at port 6969 and is accessible via all IPv4 and IPv6 addresses.
  • Tweak the binary to run it with the options of your liking.
Options:
  -p, --portdata TEXT  Set the port value [0-65536]
  -6, --ipprotv6       Start the server on an IPv6 address
  -4, --ipprotv4       Start the server on an IPv4 address
  --version            Show the version and exit.
  --help               Show this message and exit.
  • Open up a browser in a device reachable to your PC and visit http://<IP-ADDRESS>:6969/primary to get started.
  • When done tinkering, stop the SYSMON server by pressing [Ctrl+C].

Using the script

  • Install python3 and pip with your GNU/Linux distribution-specific package managers.
  • Install and upgrade virtualenv if not already done by executing pip3 install virtualenv --user.
  • Clone the repository on your local drive and make it your current working directory.
  • Create a virtual environment by executing virtualenv venv.
  • Activate the virtual environment by executing source venv/bin/activate.
  • Install all dependencies for the project by executing pip3 install -r requirements.txt.
  • Run the project server by executing python3 main.py -p 6969 -6. This runs the webserver at port 6969 and is accessible via all IPv4 and IPv6 addresses.
  • Tweak the service with the help of command line arguments to run it with the options of your liking.
Options:
  -p, --portdata TEXT  Set the port value [0-65536]
  -6, --ipprotv6       Start the server on an IPv6 address
  -4, --ipprotv4       Start the server on an IPv4 address
  --version            Show the version and exit.
  --help               Show this message and exit.
  • Take a note of the computer's IP address and make sure that it is reachable.
  • Visit http://<YOUR-IP-ADDRESS>:6969/primary from the other device (or http://localhost:6969/primary on the same PC).
  • Take a look at the different themes available, refresh the monitor or print reports when needed.
  • Select processes to open up modals - TERMINATE, KILL, SUSPEND and RESUME processes at will.
  • Press [Ctrl+C] on the terminal to stop the SYSMON server.
  • When done tinkering, deactivate the virtual environment by executing deactivate.

Executing sysmon as a service

You may run SYSMON as a service on Generic PC in the following way.

Using the packaged binary

  • Download the latest binary from the releases page.
  • Install nano text editor with your GNU/Linux distribution-specific package managers if not already installed.
  • Execute sudo nano /etc/systemd/system/WebStationSYSMON.service and add the following lines.
[Unit]
After=network.target

[Service]
ExecStart=/usr/local/bin/WebStationSYSMON -p 6969 -6

[Install]
WantedBy=default.target

The above example is a systemd service for the binary which would execute it on boot on port number 6969 and would be accessible to both IPv4 and IPv6 addresses.

  • The following options are available for tweaking as per your choice.
Options:
  -p, --portdata TEXT  Set the port value [0-65536]
  -6, --ipprotv6       Start the server on an IPv6 address
  -4, --ipprotv4       Start the server on an IPv4 address
  --version            Show the version and exit.
  --help               Show this message and exit.
  • Copy the downloaded WebStationSYSMON file to /usr/local/bin/ directory.
  • Make the binary executable by running sudo chmod 744 /usr/local/bin/WebStationSYSMON.
  • Make the systemd service file executable by running sudo chmod 664 /etc/systemd/system/WebStationSYSMON.service.
  • Reload new systemd service configuration files by running sudo systemctl daemon-reload.
  • Enable the newly created service by running sudo systemctl enable WebStationSYSMON.service.
  • To test the script before a reboot, execute sudo systemctl start WebStationSYSMON.service.
  • Check the service status by running sudo systemctl status WebStationSYSMON.service.
  • Open up a browser in a device reachable to your PC and visit http://<IP-ADDRESS>:<PORT-NUMBER>/primary to get started.
  • To stop the service, execute sudo systemctl stop WebStationSYSMON.service - It will start again on boot.
  • To disable the service, execute sudo systemctl disable WebStationSYSMON.service - It will need enabling to work.

You may request for the addition of new features in the issues page but as the project is singlehandedly maintained - it might take time to develop on them.

Please consider forking the repository and contributing to its development. ❤️

Clone this wiki locally