Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

crontab -r help

113 views
Skip to first unread message

Basil Holloway

unread,
Mar 23, 2008, 10:32:36 PM3/23/08
to
On a 7025-F80 running 5200-09
was working in a terminal and this popped up

"rc.powerfail:2: :WARNING!!! The system is now operating
with a power problem. This message will be walled every 12 hours. Remove
this crontab entry after the problem is resolved."

Ran #diag and found no problems.
Shutdown, attatched a terminal and read
Processor Errors and there were nome.
Post Errors and there were four dated 30/12/2007 where I had a power supply
failure and fixed up in Dec 2007. Ran C and deleted the old errors. They
were the
only errors in the file.
Restarted the unit without terminal and all is okay.

Am reasonably sure the warning I got above was a hangover from the Dec 2007
power
supply problem. I perhaps may have done 12 hours training on this machine
since
Dec 2007 hence the message coming up now.

Now turned to remove the crontab entry as advised by the warning message.
Read Redbook SG24-7199-00 pages 542 to 551 but stumped by the warnig note on
page
551 re using #crontab -r as root and deleting file
/var/spool/cron/crontabs/root.
I figure it is not much use restoring the file from backup as it is just
putting
the junk back.
There is only one user on this machine, root.

Here are the various commands that the Redbook suggested

#crontab -l

#0 3 * * * /usr/sbin/skulker
#45 2 * * O/usr/lib/spell/compress
#45 23 * * * ulimit 5000; /usr/lib/smdemon.cleanu > /dev/null
0 11 * * * /usr/bin/errclear -d S,O 30
0 12 * * * /usr/bin/errclear -d H 90
0 15 * * * /usr/lib/ras/dumpcheck >/dev/null 2>&1
# SSA warning: Deleting the next two lines may cause errors in redundant
# SSA warning: hardware to go undetected.
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
# SSA warning: Deleting the next line may allow enclosure hardware errors to
go undetected
30 * * * * /usr/lpp/diagnostics/bin/run_ssa_encl_healthcheck 1>/dev/null
2>/d
ev/null
# SSA warning: Deleting the next line may allow link speed exceptions to go
undetected
30 4 * * * /usr/lpp/diagnostics/bin/run_ssa_link_speed 1>/dev/null
2>/dev/null
0 00,12 * * * wall% rc.powerfail:2: :WARNING!!! The system is now operating
with a power problem. This message will be walled every 12 hours. Remove
this crontab entry after the problem is resolved.

# Is -l /var/spool/cron/crontabs
tota1 32
-rw-r--r-- 1 adm cron 2020 14 Sep 2002 adm
-rw------- 1 root cron 1926 08 Jan 13:19 root
-rw-r--r-- 1 sys cron 853 14 Sep 2002 sys
-rw-r--r-- 1 root cron 1122 02 Oct 11:39 uucp

# atq ( This command returned nothing )
#

Couple of questions please.

Firstly, am I right in summising the warnig relates to the Dec 2007 power
supply
failure.
Secondly, by running C to clear the old error messages in service processor
mode,will this fix up and turn off the crontab warning so I get over the
#crontab
-r problem.

Thanks
Basil

Uwe Auer

unread,
Mar 24, 2008, 8:59:38 AM3/24/08
to
Basil Holloway schrieb:

Hi,

1) Yes
2) No - Service Processor does not have access to root crontab, since it
does neither have access to AIX nor to rootvg
3) Just use "crontab -e" to edit roots crontab and delete the "wall%
rc.powerfail:2:" entry by moving to the line and type "ESC dd ESC :wq"

Regards,
Uwe Auer

Basil Holloway

unread,
Mar 24, 2008, 8:57:08 PM3/24/08
to

"Uwe Auer" <u...@franke-auer.de> wrote in message
news:fs88jq$qco$1...@online.de...
Thanks Uwe for your reply.
However I could not get your instructions to work.
Here is what I did.
Opened a terminal and typed in at # prompt "crontab -e" and a "Text
Editor-crontabMErlia" opened.
Scrolled down to the last line starting with

0 00,12 * * * wall% rc.powerfail:2: :WARNING!!! The system is now operating
............the problem is resolved.
and with the curser blinking in front of 0 00,12*** hit the ESC key
typed in dd and hit ESC again then typed in :wq and hit the ENTER key and
all the screen did was left dd:wq on the line and the line I was trying to
delete jumped down one line.
This did not look right so I exited "Text Editor-crontabMErlia" without
saving.
I thought with the dd and :wq instructions #crontab -e would have opened the
file in vi.
Searching the web I found advice not to use vi to edit the file but to use
crontab -e but the advice I found all related to AIX 4.3 not 5.2.
I am obviously doing something wrong with you instructions.
In the "Text Editor-crontabMErlia" can one use the delete key to just delete
the whole line and then click on save ?
Thanks for your patience.
Basil

Uwe Auer

unread,
Mar 25, 2008, 3:44:22 AM3/25/08
to
Basil Holloway schrieb:

Hello,

sorry to be unprecise. My instructions are only correct, if environment
variable EDITOR is set to "vi" (crontab -e uses the editor set by EDITOR
environment variable). It looks to me as if your EDITOR is set to some other
value. You can use any EDITOR you like, but if not set to "vi" you have to use
the EDITORs commands or actions to edit the crontab; my directions do not work.

To check your EDITOR type: echo $EDITOR
To change your EDITOR temporarily to "vi" type: export EDITOR=vi
To use a different EDITOR: export EDITOR=<path_to_your_editor_program>

You may also use the following *alternate* procedure:

1) Make a backup of root crontab
cp /var/spool/cron/crontabs/root /tmp/root-crontab.bak
2) Create a copy of your backup file
cp /tmp/root-crontab.bak /tmp/root-crontab.new
3) Edit copy of your backup file
vi /tmp/root-crontab.new (or any other editor)
4) Copy new crontab to var/spool/cron/crontab
cp /tmp/root-crontab.new /var/spool/cron/crontabs/root
5) Initialise cron daemon
kill -1 <process_id_of_cron_daemon>


Hope that helps.

Regards,
Uwe Auer

Hajo Ehlers

unread,
Mar 25, 2008, 7:10:07 AM3/25/08
to
...
New crontab without an editor session
## backup crontab
crontab -l > crontab.bkp

## Remove a line with your crontab like rc.powerfail
# Preview

crontab -l | grep -v "rc.powerfail:2:"

# Preview Ok
crontab -l | grep -v "rc.powerfail:2:" | crontab

cheers
Hajo

Basil Holloway

unread,
Mar 25, 2008, 11:48:47 PM3/25/08
to

"Uwe Auer" <uwe....@franke-auer.de> wrote in message
news:fsaagm$3kb$1...@online.de...

Uwe Auer.
Don't be sorry, all my fault through lack of AIX knowledge.

For your info #echo $EDITOR displays /usr/dt/bin/dtpad

Used your method " To change your EDITOR temporarily to "vi" type: export
EDITOR=vi " and every thing seemed to go okay.
Did a #shutdown -Fr and back to cde.
Did a #mail and there was an email advising me that my power supply was
crook.
As it was dated Jan 2008, I just ignored it, but F80 had the last laugh.

Thanks for your help.

Basil Holloway

unread,
Mar 25, 2008, 11:48:48 PM3/25/08
to

"Hajo Ehlers" <ser...@metamodul.com> wrote in message
news:e74ab65a-6388-4512...@t54g2000hsg.googlegroups.com...

Hajo thanks for your reply.
Sorry I could not really understand it, so took the novices easy route.
Have to hit the RedBooks harder.

Thanks
Basil


0 new messages