The ‘kill’ command can be used effectively to do this using the following process…
1. Locate the process identification number (PID) of the process you wish to terminate by running the command:
nokia[admin]# ps –auxwww
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
root 1751 0.0 0.0 472 208 d0 R+ 11:50AM 0:00.01 ps -auxwww
root 1 0.0 0.0 356 172 ?? Is 8:19AM 0:00.01 /sbin/init --
root 2 0.0 0.0 0 0 ?? DL 8:19AM 0:00.00 (pagedaemon)
root 3 0.0 0.0 0 0 ?? DL 8:19AM 0:00.00 (vmdaemon)
root 4 0.0 0.0 0 0 ?? DL 8:19AM 0:00.30 (update)
root 133 0.0 0.1 1400 1120 ?? Is 8:21AM 0:00.08 /bin/pm
root 146 0.0 0.1 204 560 ?? Ss 8:21AM 0:00.08 /usr/sbin/syslogd -t -6
root 176 0.0 0.0 472 336 ?? I 8:21AM 0:00.02 /bin/csh -fb /opt/CPsuite-R65/svn/bin/cprid_wd
root 181 0.0 0.9 4996 7116 ?? I 8:21AM 0:00.33 /opt/CPsuite-R65/svn/bin/cprid
root 298 0.0 0.3 1128 2216 ?? Ss 8:21AM 0:00.73 /bin/httpd -d /web
root 310 0.0 0.3 7096 2404 ?? Ss 8:21AM 0:00.13 /bin/ipsrd -N
root 313 0.0 0.5 2244 3836 ?? Ss 8:21AM 0:12.67 /bin/xpand
root 314 0.0 0.1 764 1056 ?? Is 8:21AM 0:00.82 /bin/ifm /config/active
root 364 0.0 0.3 1080 2532 ?? Is 8:21AM 0:00.48 /opt/CPsuite-R65/svn/bin/cpwd
root 382 0.0 0.1 184 620 ?? Is 8:21AM 0:00.00 /usr/sbin/inetd -n
root 383 0.0 0.2 252 1204 ?? Is 8:21AM 0:00.01 /opt/CPsuite-R65/bin/ifwd
root 384 0.0 0.6 3012 4956 ?? Is 8:21AM 0:05.79 /bin/clishd default server
2. Terminate the process gracefully by running the command:
nokia[admin]# kill –HUP [PID of the process to be terminated]
NOTE: Some processes are monitored by the watchdog process which will respawn the process as soon as it is terminated.
To terminate a process which may be monitored by watchdog the following command may be used:
nokia[admin]# dbset process:[exact name of the process]
To restart a process terminated using the above method you can issue the following command:
nokia[admin]# dbset process:[exact name of the process] t
It is always a good idea (for good measure) to save any time to perform a dbset change by issuing the command:
nokia[admin]# dbset :save
============================
kill –HUP
dbset process:snmpd
dbset process:clishd
dbset process:httpd
dbset :save
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.