LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 05-03-2007, 02:55 AM   #1
l_leonard
LQ Newbie
 
Registered: May 2007
Posts: 8

Rep: Reputation: 0
Smile Maintenance File System


Hi..i am leonard a new member here..
My question is,
If in a file system, the capacities has reached 80%, is there any alert message to user? If is exist, I wish to make it in a script then I implement into crontab
thank u
 
Old 05-03-2007, 09:04 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Hi and Welcome to LQ.
There is no specific alert sent to users when a FS reach the 80% limit.

A system message is written to the console and /var/adm/messages when a write fails because of a full file system, eg:
Code:
Apr  2 22:01:10 bestouan ufs: [ID 213553 kern.notice] NOTICE: realloccg /s4: file system full
 
Old 05-03-2007, 09:40 AM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Of course you can set up alerting for this and many other things.

That could be as sophisticated as a full system (like Nagios with NRPE plugins) or as simple as scripting:

Code:
#!/bin/bash
while true do
HOMEPCT=`/bin/df /home |/bin/grep /home |awk '{print $5}' |cut -d% -f1`
if [ $HOMEPCT -ge 80 ]
then echo "The filesystem is now at ${HOMEPCT}% | /bin/mail -s "Space Alert on /home" yourmailname@yourmaildomain
     /bin/sleep 60
done
The above would check every minute and email you if the space had reached or exceeded 80%. You can change /home to whatever you want or put in multiple lines for each run.
 
Old 05-03-2007, 11:28 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
jlightner: please do not promote such a spam machine !!

There is no point in sending every minute the same message to any user, even oneself.
 
Old 05-03-2007, 11:36 AM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
I did say it was a "simple" script. It will only email when the filesystem has reached 80%. You're correct that it would email you every minute thereafter.

One COULD put logic in to limit it to so many emails per hour but I wasn't trying to provide a full monitoring solution - just showing that it could be done. I think were it me I'd rather risk being spammed to know my FS was about to be full than to wait to look in the log file AFTER it was full.

As for me I use Nagios with NRPE plugins which was my first suggestion above.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
System maintenance Provogeek Linux - Newbie 2 09-19-2006 06:33 PM
System maintenance FictionPimp Linux - Newbie 2 02-01-2005 02:04 PM
System Maintenance hiplainsdrifter Linux - Newbie 1 04-07-2004 12:14 PM
System maintenance tied2 Linux - General 1 07-02-2002 11:01 PM
system maintenance vicente Linux - Newbie 2 08-31-2001 04:34 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 06:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration