reniced: Better explanation of what happened.

zram: Try to be backwards compatible.
This commit is contained in:
Ole Tange 2012-05-15 15:32:27 +02:00
parent 273c2a93d7
commit 8284349d89
2 changed files with 7 additions and 4 deletions

View file

@ -56,7 +56,7 @@ sub mail {
my($cpu_seconds, $user, @command) = @_;
my @mail =
(
'From: Ole Tanges renice program <tange@binf.ku.dk>',
'From: The renice program <root>',
"To: <$user>",
'Subject: Your program has been reniced',
'',
@ -68,7 +68,10 @@ sub mail {
'',
"has been using more than $cpu_seconds CPU seconds. I have therefore niced it to nice level 19.",
'',
'If you want to avoid that in the future, you can start the program with a different nice level:',
'There is no harm done, this is purely for your information so you know what happened and how',
'to avoid it.',
'',
'If you want to avoid it in the future, you can start the program with a different nice level:',
'',
' nice -n XX your_command',
'',
@ -80,7 +83,7 @@ sub mail {
'',
'Regards',
'',
"Ole Tange's renice program",
"The renice program",
);
open(S,"|/usr/sbin/sendmail -t") or die;

View file

@ -24,7 +24,7 @@ start() {
mem_total=$((mem_total_kb * 1024))
# load dependency modules
modprobe zram zram_num_devices=$num_cpus
modprobe zram zram_num_devices=$num_cpus || modprobe zram num_devices=$num_cpus || exit 1
# initialize the devices
for i in $(seq 0 $decr_num_cpus); do