Adddding new monitoring Templates
This commit is contained in:
		
							
								
								
									
										13
									
								
								bin/lm_sensors.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								bin/lm_sensors.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| cachefile='/tmp/lm_sensors.log'  | ||||
| if [ -f $cachefile ]; then | ||||
|     cachefileage=$(($(date +%s) - $(stat -c %Y $cachefile))) | ||||
|     if [ $cachefileage -gt 300 ]; then | ||||
|         sensors > $cachefile | ||||
|     fi | ||||
| else | ||||
|     sensors > $cachefile | ||||
| fi | ||||
|  | ||||
| cat $cachefile | grep "$1" | cut -d ":" -f 2 | sed -e 's/^[ \t]*//' | cut -d " " -f 1 | tr -d "+°C?" | ||||
		Reference in New Issue
	
	Block a user
	 kamil
					kamil