I would like to run cron job daily at 8:00 P.M in order to check the filesysem sizes , if if finds any filesystem space reaches to 90% it should me an email address to my outlook ( xxxxxx@abcd.com ) .
need your suggestion or direction how to achieve this.
Assuming you have are monitoring the /var filesystem on a Solaris system then you could use:
So to extract the value you could use:
Which will extract the percentage full (the fifth item in the list) avoiding picking up the fifth item in the header line.
So in a script you would so:
You can then test for a value greater than 90% you can do:
Sending an email depends on what you have on your system, on Solaris I would use mailx thus:
Where you have put what you want to send in the message in inputfile.
You would then call the resulting script from cron at 8pm every night:
HTH
Hi,
Thanks for your update,
could you help me to comeout of this mailx problem , I dont why it couldnot able to send message to one of my Microsoft Outlook email .
The part of the log that shows what mail server it is talking to would be helpful.
The MS Exchange server has to have SMTP enabled - you'll need to ask and Exchange expert about how to do that.
For Solaris 8 and below to make your Solaris machine use a particular machine as its mail server you can put an entry into its /etc/hosts file giving the IP address, name and then an alias of mailhost, this can be done in DNS using a MX (mail exchanger) record..
Hello Moderators,
Greetings !!
This is regarding my friend to whom I refered this forum to learn UNIX. User didn't receieved any registration email yet, could you please help user. Will be grateful to you on same.
Login name: Gurvinder_Kaur
NOTE: User doesn't have enough bits for... (0 Replies)
I created a bash script that gets a file formats it, sends an email to the user(s), however, for whatever reason, it will send an email per line with all of the lines in it, so essentially the user will get 10 duplicate emails with the same 10 results. I've modified the script to put the results of... (2 Replies)
Folks,
I have written one script for following condition by referring some of online post in this forum. Please correct it if I'm missing something in it. (OS: AIX 5.3)
List the idle user. (I used whoidle command to list first 15 user and get username, idle time, pid and login time).... (4 Replies)
hi all,
This is user that i want sent the email:
Email = allan@gmail.com bruce8899@gmail.com Chris@gmail.com
echo "$dir : $filecount is over the limit $limit " | mailx -s "${SUBJECT}" "${email}"
However it cannot sent to 3 user..only sent to 1 user email address.
Any 1 can help me... (15 Replies)
Hello everyone
I have a problem and I need your help:
I have a Solaris 10 and Solaris 8 UNIX Servers, and Linux Centos4 as email server.
I need send an email from Solaris servers preferably using Centos4 email server.
I have no mail service configured in my Solaris computers (1 Reply)
Hi
I am using mailx to send email and am wondering if there is a way I can send the email from a different user than the user logged in.
something like do-not-reply@xyz.com
Thank you. (1 Reply)