From: Chris Koeritz Date: Thu, 18 Apr 2013 00:11:23 +0000 (-0400) Subject: nice mod to sort the files / dirs by name before dumping them. X-Git-Tag: 2.140.90~1012 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=b4d5edebb6afd504ae74fbbf31f2de338cc76002;p=feisty_meow.git nice mod to sort the files / dirs by name before dumping them. --- diff --git a/database/configuration/cron/process_check.crontab b/database/configuration/cron/process_check.crontab new file mode 100644 index 00000000..e4ee8cb4 --- /dev/null +++ b/database/configuration/cron/process_check.crontab @@ -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/files/filedump.pl b/scripts/files/filedump.pl index 858fdd80..3fa5b0f3 100644 --- a/scripts/files/filedump.pl +++ b/scripts/files/filedump.pl @@ -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 index 00000000..e9f0388c --- /dev/null +++ b/scripts/processes/show_hot_processes.sh @@ -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