Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

You have mail in /usr/spool/mail/root

Status
Not open for further replies.

pctech321

IS-IT--Management
Oct 20, 2007
18
US
Hello..

Everytime I login to aix box I seen the “You have mail in /usr/spool/mail/root “
I run mail command it shows me a lot..below is the snipped output..

drm01/root: / # mail
Mail [5.2 UCB] [AIX 5.X] Type ? for help.
"/var/spool/mail/root": 32570 messages 1 new 32570 unread
U32553 daemon Wed Nov 7 12:45 32/1012 "Output from cron job touch /"
U32554 daemon Wed Nov 7 13:10 35/1161 "Output from cron job /paci1"
U32555 daemon Wed Nov 7 13:15 32/1012 "Output from cron job touch /"
U32556 daemon Wed Nov 7 13:30 32/948 "Output from cron job /paci1"
U32557 daemon Wed Nov 7 13:45 32/1012 "Output from cron job touch /"
U32558 daemon Wed Nov 7 13:55 35/1161 "Output from cron job /paci1"
U32559 daemon Wed Nov 7 14:10 39/1425 "Output from cron job /paci1"
U32560 daemon Wed Nov 7 14:15 32/1012 "Output from cron job touch /"
------
----------
( SNIPPED)
---------
-------

Held 32569 messages in /var/spool/mail/root

After that I run du command I found the below output

drm01/root: /var/spool/mail # du -sk *
3 daemon
11300 kiwimis
32084 root

total usage of /var is below

/dev/hd9var 0.69 0.04 94% 1764 1% /var

is that means sendmail is not working well or do I need to change qpi variable value right now it is default value of 30minutes ..or can we delete these entries manually by any command????

how to handle this issue…
ur sugg are appreciated..

thank you……..
 
Good Morning,

looks like you have a lot of crontab entries sending their output to root via mail ...

You should run

crontab -e

and change all entries to either send their output and error messages into a file or if you don't need the output send it to /dev/null

e.g.:

42 07 * * * /scripts/test/crontest > /tmp/test 2>/dev/null

to send the output of crontest command to /tmp/test and the error messages to /dev/null

To delete the mails you already have run

mail
d1-32570 # This deletes message 1 to 32570
quit

Regards
Thomas
 
Code:
That's what i wanted to post today morning but i forget to do so after writing all of this :)

You can clear your email by accessing the mail and then do this

d 1-32570

and then exit with the 'q' letter.

This will clear these messages from the mail!

Now to look at the problem I need to know how your crontab is structured! so could you please post your crontab over here?

Regards,
Khalid
 

Here is the crontab entries …I snipped most of them which output doen’t redirected to /dev/null

What that /dev/null means ???? the output is stored in that file ?? and what about last 4 entries (/dev/null 2>/dev/null)
There there are two consequtive /dev/null entries ..one is for output and another is for error msg’s ( Thomas said ) ?
So do I need to change any of this crontab structure ?
And to delete ? d1-32570 here there should be a space between d and 1 ?


00 7,15,23 * * 1-6 $SUPPBIN/perf.sh > /dev/null 2>&1
00-59 * * * * $SUPPBIN/smodemctrl.sh > /dev/null 2>&1
00 14 * * 0 /usr/bin/mksysb -i /dev/rmt0 > $SUPPBIN/tmp/mksysb.msg 2> /dev/null
30 12 * * 0 $SUPPBIN/inetclean.sh > /dev/null 2>&1
30 22 * * 1-5 /usr/zbin.online/recalc > /dev/null
#00 2 * * 2-6 /usr/zbin/backups system > /dev/null
00 1 * * 0,3,5 /usr/zbin.online/backups online > /dev/null
30 1 * * 1-5 usr/bin/ksh /usr/zbin/schema_chk > /dev/null
15,45 * * * * /usr/zbin/statest > /dev/null
0 0 * * 1-6 /usr/zbin/30daydel.shl /home/zytek/GRAVEYARD > /dev/null
00 04 * * 1-6 /wewu/wewu/site/bin/wewuclean 1>/dev/null 2>&1
#15 06,14,22 * * * su kiwimis -c "/wewu/wewu/site/bin/stkrpt.sh" >/dev/null 2>&1
#1 * * * * su kiwimis -c "/wewu/wewu/site/bin/send.rolldata" >/dev/null 2>&1
0 15 * * * /usr/lib/ras/dumpcheck >/dev/null 2>&1
01 5 * * * /usr/lpp/diagnostics/bin/run_ssa_ela 1>/dev/null 2>/dev/null
0 * * * * /usr/lpp/diagnostics/bin/run_ssa_healthcheck 1>/dev/null 2>/dev/null
30 * * * * /usr/lpp/diagnostics/bin/run_ssa_encl_healthcheck 1>/dev/null 2>/dev/null
30 4 * * * /usr/lpp/diagnostics/bin/run_ssa_link_speed 1>/dev/null 2>/dev/null

thank you so much for ur replies..

thankx thomas , khalid..


 
Hi there,

there's no space between d and 1 ...

/dev/null means that everything you direct there is being deleted without being displayed or saved to a file. So you have to take a look at each entry and decide which output you might need and which you won't need.

As for the 1> 2> ...

... you can redirect the following to a file or /dev/null:

0>
1>
2>

where 0> means stdin (e.g. keyboard), 1> means stdout (screen) and 2> means stderr (error messages).

So 1> should be similar to just using >

Regards
Thomas
 
/dev/null is the 'bit bucket', the unix black hole from which there is no return!

I want to be good, is that not enough?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top