server_status.sh #2

  • //
  • guest/
  • robert_cowham/
  • perforce/
  • sdp/
  • Maintenance/
  • server_status.sh
  • View
  • Commits
  • Open Download .zip Download (1 KB)
#!/bin/bash
#==============================================================================
# Copyright and license info is available in the LICENSE file included with
# the Server Deployment Package (SDP), and also available online:
# https://swarm.workshop.perforce.com/projects/perforce-software-sdp/view/main/LICENSE
#------------------------------------------------------------------------------

# This script is used to check the status of all the instances running on this machine. 
# It can handle named and numbered instances.

echo "==========================================";
echo "|   SDP Server Status for $totalServers instances    |";
echo "==========================================";
FILES_LIST="$(ls /p4/*/root/db.have 2>/dev/null)"
for file in $FILES_LIST; do
	serverName=$(echo $file | cut -f3 -d/)
        /p4/$serverName/bin/p4d_$serverName\_init status | grep ^ServerID:
        /p4/$serverName/bin/p4d_$serverName\_init status | grep uptime
	/p4/$serverName/bin/p4d_$serverName\_init status | grep root
	/p4/$serverName/bin/p4d_$serverName\_init status | grep version
       echo "==========================================";
done
# Change User Description Committed
#2 22477 Robert Cowham Bring latest dev changes into test
#1 18586 Robert Cowham Branching using cowhamr.sdp.dev
//guest/perforce_software/sdp/dev/Maintenance/server_status.sh
#1 17229 Dale Sumbler SDP server status for Unix only.