Tiny Core Linux
		Tiny Core Base => CorePlus => Topic started by: malikawan on April 18, 2016, 04:36:43 AM
		
			
			- 
				I want to monitor read write disk, remaining ram and cpu temperature with script and write the output to file. I need just commands or any idea to write a script if any one can help. Thanks in advance 
 
- 
				Why just write the info to a text file ??
 Just do a sqlite3 database.
 For easy parse the values from the database afterwards.
 
 https://www.sqlite.org/cli.html
 
 http://stackoverflow.com/questions/4152321/how-to-automate-an-insert-into-process-in-sqlite?answertab=active#tab-top
- 
				Simple disk activity monitor script:
 http://forum.tinycorelinux.net/index.php/topic,16256.msg96390.html#msg96390
- 
				RAM: Try the  free  command.
 free -m | awk '/Mem:/ {printf "Free: %s MB\n", $4}'
 
 CPU temperature: Possible with  lm_sensors  which is currently not available in the 7.0 x86 repo.
- 
				Free memory including buffers and cache:
 echo "Free: $(( $(( $(cat /proc/meminfo | awk '/^MemFree:/ {print $2}') + $(cat /proc/meminfo | awk '/^Cached:/ {print $2}') + $(cat /proc/meminfo | awk '/^Buffers:/ {print $2}') )) / 1024 )) MB"
 
- 
				For temp without decimals.
 echo $(($(cat /sys/class/thermal/thermal_zone0/temp)/1000))
 
For more funny solution to support 2 decimals need bc.
 echo $'scale=2\n'$(cat /sys/class/thermal/thermal_zone0/temp)/1000 | bc