08-06-2003
DFR=`df yourfilesystem |grep -v Filesystem |awk '{print $4}'`
if [ $DFR > "90% ]
then
....
else
...
fi
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How can we check the number of hard disks (both internal & external) in a server, their capacity and serial number (5 Replies)
Discussion started by: muneebr
5 Replies
2. UNIX for Dummies Questions & Answers
rshstatus=`rsh -n lilo /db/p2/oracle/names9208/restart_names.sh`
if $rshstatus <>0 then
errstatus=1
mailx -s "xirsol8dr" ordba@xxx.com >> $log_dr
else if errstatus=0
echo "status to xirsol8dr successful"
can anyone provide if this is t he correct way to do this or is there a better way? (1 Reply)
Discussion started by: bpm12
1 Replies
3. Linux
Hi all,
I'm kind of new to programming in Linux & c/c++. I'm currently writing a FileManager using Ubuntu Linux(10.10) for Learning Purposes. I've got started on this project by creating a loopback device to be used as my virtual hard disk. After creating the loop back hard disk and mounting it... (23 Replies)
Discussion started by: shen747
23 Replies
4. Shell Programming and Scripting
I have a requirement to check whose accounts are expired in Linux machine and send a mail to root user about the accounts. How can i achieve this in Linux? (1 Reply)
Discussion started by: mnmonu
1 Replies
5. Shell Programming and Scripting
Hi Guys,
I have a postfix server which is deferring emails. Now I need to send notification to a specific email address if:
The sender of the deferred email is: abc@example.com
Contains specific subjects: a file (/opt/subjects) contains all the subjects in place
Then need to send a... (0 Replies)
Discussion started by: linuxrulz
0 Replies
6. AIX
Please help with command to check the busy % for a hard disk device like hdisk5
Best regards,
Vishal (7 Replies)
Discussion started by: Vishal_dba
7 Replies
7. Shell Programming and Scripting
Hi Guys,
I am not Good at scripting.
I need to write a script such that if output of command shows the particular word in output then send mail to abc@compay.com
-bash-3.2$ ps -ef | grep bpbkar
root 6040 1 0 13:05:19 ? 0:00 bpbkar -r 2678400 -ru root -dt 47395 -to 0... (20 Replies)
Discussion started by: manalisharmabe
20 Replies
8. HP-UX
how to check overall hard disk utilization in unix?
we use bdf command to find the utilized space for the particular path
bdf filepath
how can i find overall hard disk utilization? (4 Replies)
Discussion started by: ashwanthfrq
4 Replies
9. Shell Programming and Scripting
I need to check my script and change to working mode. currently it was not sending the mail and exit without calling the second script.
I need to check the file is present ="/home/Rvtools/test.csv"
if this file not found after the time retry send mail file not found
If the file exit run the... (2 Replies)
Discussion started by: ranjancom2000
2 Replies
HALT(8) Linux System Administrator's Manual HALT(8)
NAME
halt, reboot, poweroff - stop the system.
SYNOPSIS
/sbin/halt [-n] [-w] [-d] [-f] [-i] [-p] [-h]
/sbin/reboot [-n] [-w] [-d] [-f] [-i]
/sbin/poweroff [-n] [-w] [-d] [-f] [-i] [-h]
DESCRIPTION
Halt notes that the system is being brought down in the file /var/log/wtmp, and then either tells the kernel to halt, reboot or poweroff
the system.
If halt or reboot is called when the system is not in runlevel 0 or 6, in other words when it's running normally, shutdown will be invoked
instead (with the -h or -r flag). For more info see the shutdown(8) manpage.
The rest of this manpage describes the behaviour in runlevels 0 and 6, that is when the systems shutdown scripts are being run.
OPTIONS
-n Don't sync before reboot or halt.
-w Don't actually reboot or halt but only write the wtmp record (in the /var/log/wtmp file).
-d Don't write the wtmp record. The -n flag implies -d.
-f Force halt or reboot, don't call shutdown(8).
-i Shut down all network interfaces just before halt or reboot.
-h Put all harddrives on the system in standby mode just before halt or poweroff.
-p When halting the system, do a poweroff. This is the default when halt is called as poweroff.
DIAGNOSTICS
If you're not the superuser, you will get the message `must be superuser'.
NOTES
Under older sysvinit releases , reboot and halt should never be called directly. From release 2.74 on halt and reboot invoke shutdown(8) if
the system is not in runlevel 0 or 6. This means that if halt or reboot cannot find out the current runlevel (for example, when
/var/run/utmp hasn't been initialized correctly) shutdown will be called, which might not be what you want. Use the -f flag if you want to
do a hard halt or reboot.
The -h flag puts all harddisks in standby mode just before halt or poweroff. Right now this is only implemented for IDE drives. A side
effect of putting the drive in standby mode is that the write cache on the disk is flushed. This is important for IDE drives, since the
kernel doesn't flush the write-cache itself before poweroff.
The halt program uses /proc/ide/hd* to find all IDE disk devices, which means that /proc needs to be mounted when halt or poweroff is
called or the -h switch will do nothing.
AUTHOR
Miquel van Smoorenburg, miquels@cistron.nl
SEE ALSO
shutdown(8), init(8)
Nov 6, 2001 HALT(8)