Skip to content

Commit ea51d1d

Browse files
committed
update readme
1 parent 54657ed commit ea51d1d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Monitor Linux Server
1+
# Monitor Linux/Ubuntu Server (04/2020)
22
This is a python2 script which can be used to monitor Linux/Ubuntu/Unix server CPU, Memory and Disk utilization and issue warning as emails in the case of exceeding utilization thresholds defined. Simple and easy to understand script to a person who has basic python coding skills. Feel free to contribute for greater features.
33

4-
# Instructions
4+
## Instructions
55

6-
You can find a function name analyze_server in the server_health_monitor.py file. You write a suiltable main method and call this function inside with the suitable parameters. Script will report the current CPU, RAM and Disk utilization value to a ServerHealth.log file in the sepecified location in the parameter.
6+
You can find a function name analyze_server in the server_health_monitor.py file. Write a suiltable main method and call this function inside with the suitable parameters. Script will report the current CPU, RAM and Disk utilization values to a ServerHealth.log file in the sepecified location in the parameter.
77

8-
## Example main method
8+
### Example main method
99
```
1010
def main():
1111
# Consider:
@@ -29,7 +29,7 @@ if __name__=="__main__":
2929

3030
You can add a similar main method to server_health_monitor.py file and schedule a cron job to run periodically. By having ServerHealth.log file in a STATIC location (location where you can access from outside), will ease you to monitor the server. However, you will receive an email whenever the thresholds are reached.
3131

32-
# Test the script before scheduling a cron job
32+
## Test the script before scheduling a cron job
3333
Navigate to the location where the server_health_monitor.py is located.
3434
```
3535
sudo chmod -R 777 server_health_monitor.py
@@ -41,7 +41,7 @@ pip install library_name
4141
```
4242
If the execution is successfull, script will results nothing to the console but ServerHealth.log file.
4343

44-
# How to schedule a cron job to run the script in every 15 min
44+
## How to schedule a cron job to run the script in every 15 min
4545

4646
Open ssh to server:<br/>
4747
```
@@ -52,4 +52,4 @@ Add following entry at the end of file and save.<br/>
5252
```
5353
0,15,30,45 * * * * /usr/bin/python2 /var/www/project/server_health_monitor.py
5454
```
55-
*note: <br/> python2 location can be different from /usr/bin/python2*
55+
*note: <br/> python2 location can be different from /usr/bin/python2. Use the correct python2 location on your server.*

0 commit comments

Comments
 (0)