Merge branch 'master' of feistymeow.org:feisty_meow
authorChris Koeritz <fred@gruntose.com>
Thu, 18 Apr 2013 00:11:41 +0000 (20:11 -0400)
committerChris Koeritz <fred@gruntose.com>
Thu, 18 Apr 2013 00:11:41 +0000 (20:11 -0400)
database/configuration/cron/process_check.crontab [new file with mode: 0644]
scripts/processes/show_hot_processes.sh [new file with mode: 0644]

diff --git a/database/configuration/cron/process_check.crontab b/database/configuration/cron/process_check.crontab
new file mode 100644 (file)
index 0000000..e4ee8cb
--- /dev/null
@@ -0,0 +1,11 @@
+
+SHELL=/bin/bash
+
+# m h dom mon dow command
+
+USER=fred
+
+# a crontab for periodically dumping the process state.
+* * * * * (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/processes/show_hot_ones.sh) &>>/home/$USER/zz_hot_processes.log 
+
+
diff --git a/scripts/processes/show_hot_processes.sh b/scripts/processes/show_hot_processes.sh
new file mode 100644 (file)
index 0000000..e9f0388
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# shows the current processes ordered by cpu usage.
+
+# generate a nice separator.
+for ((i=0; i<14; i++)); do line+='='; done
+
+echo $line
+echo "Process list by CPU usage for $(date)"
+ps wuax --sort -%cpu  
+echo $line