To manually install the application download the latest win-x64 zip file from the releases section and extract it to a folder. Move the appsettings.json to a valid location (see the configuration section), and ensure that the database path in the appsettings file exists.
The application can either be executed interactively. Alternatively the following command line can be used to create a service from the application:
sc create "Process Tracker Service" binpath= "[Directory]\ProcessTrackerService.exe" start= autoTo install the application via rpm file, download the latest version from the releases section and install it with
rpm -ivh ProcessTracker-<version>.x86_64.rmpIf you manage your NixOS system using flakes, you can install the application via the provided flake:
- Add the flake to your system configuration:
{
description = "My NixOS Configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
process-tracker = {
url = "github:mmuffins/ProcessTracker";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, process-tracker, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
nixosConfigurations.my-hostname = pkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
# Import the process tracker NixOS module from the flake.
process-tracker.nixosModules.process-tracker
# ... other modules
];
configuration = { config, pkgs, ... }: {
# Enable the process tracker service.
services.process-tracker.enable = true;
};
};
};
}
- Rebuild your system
sudo nixos-rebuild switch --flake /path/to/your/flake#my-hostname
The application will automatically create a systemd service.
systemctl --user status process-tracker
To completele remove the application, delete the previously created items:
- The application
- The appsettings.json file
- The database file
- The application service
The following command can be used to delete the service:
sc delete "Process Tracker Service"The application is configured using a appsettings.json file. The application tries to locate the configuration file in different locations depending on the operating system. The search order is as follows:
- The path configured in the
PROCESSTRACKER_APPSETTINGS_PATHenvironment variable, if it is set and points to a valid file. $XDG_CONFIG_HOME/processtracker/appsettings.jsonif theXDG_CONFIG_HOMEenvironment variable is set and points to a valid location./etc/processtracker/appsettings.jsonif the application is running as therootuser.~/.config/processtracker/appsettings.jsonas the default if no other option applies.
- The path configured in the
PROCESSTRACKER_APPSETTINGS_PATHenvironment variable, if it is set and points to a valid file. C:\ProgramData\ProcessTracker\appsettings.jsonas the default if the environment variable is not set or does not point to a valid file.
The following options are supported in the configuration file:
Logging- Optional. Supports standard .net core logging settings, see https://learn.microsoft.com/en-us/aspnet/core/fundamentals/loggingAppsettingsHttpPort: TCP port to listen on for incoming connections. Defaults to 8001.DateTimeFormat: Format for datetime strings throughout the application. Defaults toyyyy-MM-dd HH:mm.DateFormat: Format for date strings throughout the application. Defaults toyyyy-MM-dd.ProcessCheckDelay: Time in seconds between the state of running applications is checked. Defaults to 20.CushionDelay: Time in seconds that has to elapse after a process cannot be found before it is considered to be terminated. Defaults to 60.DatabasePath: Path for the process tracker database defaults toC:/ProgramData/ProcessTracker/processtracker.dbin windows and/var/lib/processtracker/processtracker.dbin linux.
To upgrade the application via rpm file, download the latest version from the releases section and upgrade it using
rpm -Uvh ProcessTracker-<version>.rmpTo updating the flake:
nix flake updateThen rebuild your system:
sudo nixos-rebuild switch --flake /path/to/your/flake#my-hostnameTo apply migrations and create a new database run the following from the root folder of the solution.
dotnet ef migrations add InitialMigration --project ./ProcessTrackerService.Infrastructure --startup-project ./ProcessTrackerService
dotnet ef database update --project ./ProcessTrackerService.Infrastructure --startup-project ./ProcessTrackerService