04-15-2008
Generally, you can look at the /var/log folder or grep recursively for a pattern, otherwise you can use "last" command to get the latest system events.
In /var/log/wtmp is the binary, the application itself doesn't writes log files, as far as I know.
The other solution could be to write custom script to intercept those commands, and to write to a custom log file and location.
10 More Discussions You Might Find Interesting
1. AIX
I understand that by putting in entries into the /etc/inittab file. We can actually call the our scripts during startup.
mkitab "start_server:2:once:sh /scripts/startserver.sh"
Would the system wait for startserver.sh finish executing before it goes to another entry? and how long would it... (1 Reply)
Discussion started by: vincente
1 Replies
2. Shell Programming and Scripting
Hi all,
I have a shell script which does db shutdown ..the script snippet which does this is as follows:
function call_sql_plus {
${SQLPLUS:-sqlplus} -s /nolog <<EOF
EXIT;
EOF
if
then
echo "Error occurred while calling sqlplus "
... (3 Replies)
Discussion started by: KrishnaSaran
3 Replies
3. UNIX for Dummies Questions & Answers
Having difficulty trying to locate startup and shutdown messages. I had a bunch of servers shutdown over the weekend (due to a scheduled power outage) and upon reboot a lot of the filesystems weren't mounted and several processes weren't started...
I checked /var/adm/messages and can't locate... (2 Replies)
Discussion started by: jamie_collins
2 Replies
4. Solaris
Are rc scripts executed serially or all at the same time. Is there a way to see this happen? A log file or the syslogd?
This is Solaris 10. (2 Replies)
Discussion started by: djehresmann
2 Replies
5. AIX
hi,
If we place Sxx (startup script) and Kxx(shutdown script) in /etc/rc.d/rc2.d,then it would start and stop automatically(assume they are linked to other script that actually starts/stops).
is there really a link needed here to /etc/rc.d/init.d? if not,what is the use of this directory..?... (1 Reply)
Discussion started by: to_bsr
1 Replies
6. Linux
Hi,
I'm using 2.6.11 kernel on ARM 9. Below are the messages I get issuing different commands.
When I give "reboot" I get run level 6 initiated and get the following messages. I have nothing to complaint about it. All the scripts in rc6.d are executed.
The system is going down for reboot... (3 Replies)
Discussion started by: suryaemlinux
3 Replies
7. Shell Programming and Scripting
Dear Experts ,
I want to stop and Start tomcat at the time of shutdown and startup of our server . I was trying to stop tomcat with following command
# su - dm -c "/export/home/Finder/FinderWeb/jakarta-tomcat-3.3.1a/bin/shutdown.sh"
but i am getting following error. Please suggest .... (1 Reply)
Discussion started by: Amit.saini333
1 Replies
8. AIX
Hi All,
I would like to schedule auto IPL (shutdown and start-up) by using a shell script.
Can you please give me some idea?
want to test on my lab box first.
shell script should bring AIX LPAR down and then need to start/activate the LPAR after 30 min
any idea is highly... (3 Replies)
Discussion started by: System Admin 77
3 Replies
9. Shell Programming and Scripting
Hi all,
I'm writing a script to stop & start oracle:
su - oracle -c "sqlplus / as sysdba" -c "shutdown immediate">> ${log} 2>&1
The {log} refers to the log file. The part in bold gives error:
/usr/sbin/shutdown: Only root can run /usr/sbin/shutdown
Pls suggest how to correct this.
... (5 Replies)
Discussion started by: frum
5 Replies
10. UNIX for Beginners Questions & Answers
This question is more in the line of how init messages get sent to a console during startup/shutdown. My problem has to do with exporting a VM from AWS to KVM (and a retry on virtual box). I am looking for a understanding on how init messages are sent to a device and what controls them My two... (0 Replies)
Discussion started by: jtkells
0 Replies
reboot(8) System Manager's Manual reboot(8)
NAME
reboot, halt, poweroff - reboot or stop the system
SYNOPSIS
reboot [OPTION]...
halt [OPTION]...
poweroff [OPTION]...
DESCRIPTION
These programs allow a system administrator to reboot, halt or poweroff the system.
When called with --force or when in runlevel 0 or 6, this tool invokes the reboot(2) system call itself and directly reboots the system.
Otherwise this simply invokes the shutdown(8) tool with the appropriate arguments.
Before invoking reboot(2), a shutdown time record is first written to /var/log/wtmp
OPTIONS
-f, --force
Does not invoke shutdown(8) and instead performs the actual action you would expect from the name.
-p, --poweroff
Instructs the halt command to instead behave as poweroff.
-w, --wtmp-only
Does not call shutdown(8) or the reboot(2) system call and instead only writes the shutdown record to /var/log/wtmp
--verbose
Outputs slightly more verbose messages when rebooting, useful for debugging problems with shutdown.
ENVIRONMENT
RUNLEVEL
reboot will read the current runlevel from this environment variable if set in preference to reading from /var/run/utmp
FILES
/var/run/utmp
Where the current runlevel will be read from; this file will also be updated with the runlevel record being replaced by a shutdown
time record.
/var/log/wtmp
A new runlevel record for the shutdown time will be appended to this file.
AUTHOR
Written by Scott James Remnant <scott@netsplit.com>
REPORTING BUGS
Report bugs at <https://launchpad.net/upstart/+bugs>
COPYRIGHT
Copyright (C) 2009 Canonical Ltd.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
shutdown(8) telinit(8) runlevel(8)
Upstart 2009-07-09 reboot(8)