You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-7Lines changed: 20 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,8 @@ The script will gather information:
13
13
- Network
14
14
- Hard Drives
15
15
- System OS
16
-
- Current UTC Timestamp
16
+
- System Uptime
17
+
- UTC Timestamp
17
18
18
19
The script will produce a JSON output at 5 second intervals for use with any software or server accepting a JSON input.
19
20
Example:
@@ -65,29 +66,41 @@ Clone the script with `git clone`.
65
66
66
67
Install Python.
67
68
68
-
If any library is missing do `pip install`*library*.
69
+
If any library is missing do `pip3 install`*library*.
69
70
70
71
To test the script output run with `python3 monitor.py`.
71
72
72
-
### Linux Autostart
73
+
### **Linux Autostart**
73
74
74
75
Create a cron job to run the script on every boot.
75
76
76
77
Edit cron with `crontab -e`.
77
78
78
-
Add the script at the bottom of the cron list as `@reboot python3 /path/to/script/monitor.py &`.
79
+
Add the script at the bottom of the cron list as `@reboot /usr/bin/python3 /path/to/script/monitor.py &`.
79
80
80
-
### Windows Autostart
81
+
### **Windows Autostart**
81
82
82
83
`Windows/monitor.bat` and `Windows/monitor.vbs` scripts are included.
83
84
84
85
`monitor.bat` will call python to launch `monitor.py`.
85
86
86
87
`monitor.vbs` silently calls `monitor.bat` to run in the background.
87
88
88
-
To create an autostart for Windows open the startup folder with keyboard `Windows + R`, enter `shell:startup` and create a shortcut here to `monitor.vbs`.
89
+
To create an autostart for Windows open start menu and search for `Task Scheduler`.
89
90
90
-
This will run the script in the background on every boot.
91
+
Select `Create Task`.
92
+
93
+
Enter a name e.g. monitor.
94
+
95
+
Add new trigger at login.
96
+
97
+
Add a new action and select the `Windows/monitor.vbs` script.
98
+
99
+
**Unselect** Stop task if it runs longer than 3 days.
100
+
101
+
Select Okay.
102
+
103
+
A new task will be created that runs the python monitoring script in the background every time a user starts the system and logs in.
0 commit comments