nice mod to sort the files / dirs by name before dumping them.
authorChris Koeritz <fred@gruntose.com>
Thu, 18 Apr 2013 00:11:23 +0000 (20:11 -0400)
committerChris Koeritz <fred@gruntose.com>
Thu, 18 Apr 2013 00:11:23 +0000 (20:11 -0400)
database/configuration/cron/process_check.crontab [new file with mode: 0644]
scripts/files/filedump.pl
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 
+
+
index 858fdd80e84d2a50ac560e60740b054d31842f21..3fa5b0f30e73b4e770feb456b29a9d8aac792361 100644 (file)
@@ -27,7 +27,7 @@ if ($#ARGV < 0) {
 
 # iterate over the list of files and dump them to standard output.
 
-foreach $filename (&glob_list(@ARGV)) {
+foreach $filename (sort &glob_list(@ARGV)) {
   &do_dump($filename);
 }
 
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