dmstatus
by Darryl Bond <dbond@nrggos.com.au>
#---------------------------------------------------------------------+ # Copyright (c) 2000 NRG Gladstone Operating Services. | # All Rights Reserved. | # | # | # This is free software; you can redistribute it and/or modify it | # under the terms of the GNU General Public License as published by | # the Free Software Foundation; either version 2 of the License, or | # (at your option) any later version. | # | # This software is distributed in the hope that it will be useful, | # but WITHOUT ANY WARRANTY; without even the implied warranty of | # merchantability or fitness for a particular purpose. See the GNU | # General Public License for more details. | # | # To obtain the GNU General Public License, write to: | # | # Free Software Foundation, Inc. | # 59 Temple Place - Suite 330 | # Boston, MA 02111-1307 | # USA | #---------------------------------------------------------------------+
What it does:
Program and example script to query the current status of display managers. The script also can start the first available display manager.
dmstatus
The compiled C program dmstatus reads the /tmp/_dm* files to get the current location of the display managers. It uses the file lock status to determine whether the display manager is running at present.
It then determines the process information of the running display managers. The output of dmstatuslooks like this:
B 6GA111 Operator 6GA111:0 8654 root 2000/06/28 08:16:48 V 6WPA01 View_Only ltscs20:0 28074 dmuser1 2000/11/16 13:38:31 V 6WPA02 View_Only gumby:0 16587 dmuser2 2000/12/12 06:37:19 |
This displays the display, user and PID of the display manager with the process start time.
getdm.sh
This is an example shell script which uses a list of AW/WP hostnames to query for availability. It then prints the output.
If the -s flag is used it will start a display manager by running the DMSTART variable which is defined at the top of the script.
Things in the script which have to be changed between sites:
Download
source code, compiled binary, shell script, and documentation (11 KB)
Author
Darryl Bond <dbond@nrggos.com.au>
Specialist Computer Support
NRG Gladstone Operating Services