cancel
Showing results for 
Search instead for 
Did you mean: 

Filesystem full

Fenglin
Regular Advisor

Filesystem full

Hi

I would like to check when a filesystem is 100% full, whether the batch jobs that are supposed to write to that filesystem will fail automatically on a HP-UX server.

Or, there is still some buffer? If yes, how much is that buffer?

Regards
Feng Lin
4 REPLIES
Ganesan R
Honored Contributor

Re: Filesystem full

Hi Fenglin,

The batch job will fail if the file system is 100% full. There is no buffer to hold the data.
Best wishes,

Ganesh.
rmueller58
Valued Contributor

Re: Filesystem full

I have a couple different things I check.. One example is a check of a particular log file..


SIZE=`ls -la /spi/spifps/log/bjournal.log |awk '{print $5}'`
FILE=/spi/spifps/log/bjournal.log
FILE1=/spi/spifps/log/bjourna1.log

if [ $SIZE -gt 100000 ]
then
tail -100 $FILE > /tmp/bjournal.tmp
ls -la $FILE >>/tmp/bjournal.tmp
mailx -s "Bjournal Capture" email@domain.tld, < /tmp/bjournal.
tmp
else
exit
fi

if [ $SIZE -gt 100000 ]
then
tail -100 $FILE1 > /tmp/bjournal.tmp
ls -la $FILE1 >>/tmp/bjournal.tmp
mailx -s "Bjournal Capture" email@domain.tld, email2@domain.tld< /tmp/bjournal.
tmp
else
exit
fi


ANother is a "File System"

I have a file system check that will email if the size of the file system grows about a defined percentage..

# more exportspace
#!/bin/sh
for dspace in `df -k /exportfs |tail -1 |awk '{print $1}'`
do
# COMMENT - IF disk space used percentage is less then 80% then do nothing, if diskspace use exceed 80% perform else statement
#
#
if [ $dspace -le "80" ]
then
# if dspace value less then 80 then do nothing
# logs percent in root email
echo $dspace % available
else
#if dspace value exceed 80 perform operation of notification for /exportfs
df -k /exportfs > /tmp/espace
cat /usr/local/bin/expwarn.txt /tmp/espace > /usr/local/bin/exportwarning.txt
#
# email diskspace allocation to recipients in "mailx commandline"
/usr/bin/mailx -s "Export FS exceeded 80% and is at $dspace % FULL needs attention" email@domain.tld < /usr/loca
l/bin/exportwarning.txt
fi
done
rmueller58
Valued Contributor

Re: Filesystem full

I would definitely capture filesystem based on a growth.. I've been snagged by both scenarios were a file grows exponentially, and I need to capture why, and a file system filing up is a sign of not keeping it clean or a problem..

in my file system "exportfs" I maintain it normal around 50-60%, if it grows past 80% I get notifications off the system, as there are dozens of processes writing to this file system regularly, If it fills up, backups failure.. If the root file system fills up, people can't log in.

Steven E. Protter
Exalted Contributor

Re: Filesystem full

Shalom,

There are several good scripts meeting this specification:

http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=178514

That is a gold mine of systems administration scripts.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com