Signals


graphics/finda_icon.gif

When you issue the kill command and process number, you are also sending a signal associated with the kill . We did not specify a signal in our kill example; however, the default signal of 15, or SIGTERM , was used. These signals are used by the system to communicate with processes. The signal of 15 we used to terminate our process is a software termination signal that is usually enough to terminate a user process such as the find we had started. A process that is difficult to kill may require the SIGKILL , or 9 signal . This signal causes an immediate termination of the process. I use this only as a last resort because processes killed with SIGKILL do not always terminate smoothly. To kill such processes as the shell, you sometimes have to use SIGKILL .

You can use either the signal name or number. These signal numbers sometimes vary from system to system, so view the manual page for signal , usually in section 5, to see the list of signals on your system. A list of some of the most frequently used signal numbers and corresponding signals follows :

Signal Number

Signal

1

SIGHUP

2

SIGINT

3

SIGQUIT

9

SIGKILL

15

SIGTERM

24

SIGSTOP

To kill a process with id 234 with SIGKILL , you would issue the following command:

  $ kill -9 234  > process id (PID)         > signal number     > kill command to terminate the process 

Show Remote Mounts with showmount

showmount is used to show all remote systems ( clients ) that have mounted a local file system. showmount is useful for determining the file systems that are most often mounted by clients with NFS. The output of showmount is particularly easy to read because it lists the host name and directory that was mounted by the client.

NFS servers often end up serving many NFS clients that were not originally intended to be served . This situation ends up consuming additional UNIX system resources on the NFS server, as well as additional network bandwidth. Keep in mind that any data transferred from an NFS server to an NFS client consumes network bandwidth, and in some cases, may be a substantial amount of bandwith if large files or applications are being transferred from the NFS server to the client. The following example is a partial output of showmount taken from a system. showmount runs on the HP-UX, AIX, and Linux systems I have been using throughout this chapter, but not on the Solaris system:

# showmount -a

sys100.ct.mp.com:/applic

sys101.ct.mp.com:/applic

sys102.cal.mp.com:/applic

sys103.cal.mp.com:/applic

sys104.cal.mp.com:/applic

sys105.cal.mp.com:/applic

sys106.cal.mp.com:/applic

sys107.cal.mp.com:/applic

sys108.cal.mp.com:/applic

sys109.cal.mp.com:/applic

sys200.cal.mp.com:/usr/users

sys201.cal.mp.com:/usr/users

sys202.cal.mp.com:/usr/users

sys203.cal.mp.com:/usr/users

sys204.cal.mp.com:/usr/users

sys205.cal.mp.com:/usr/users

sys206.cal.mp.com:/usr/users

sys207.cal.mp.com:/usr/users

sys208.cal.mp.com:/usr/users

sys209.cal.mp.com:/usr/users

The three following options are available for the showmount command:

-a

prints output in the format "name:directory," as shown above.

-d

lists all the local directories that have been remotely mounted by clients.

-e

prints a list of exported file systems.

The following are examples of showmount -d and showmount -e :

# showmount -d

/applic

/usr/users

/usr/oracle

/usr/users/emp.data

/network/database

/network/users

/tmp/working

# showmount -e

export list for server101.cal.mp.com

/applic

/usr/users

/ cdrom



HP-UX 11i Systems Administration Handbook and Toolkit
HP-UX 11i Systems Administration Handbook and Toolkit (2nd Edition)
ISBN: 0131018833
EAN: 2147483647
Year: 2003
Pages: 301

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net