#!/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 #------------------------------------------------------------------------------ # Common functions for using 'ps' to check on process ids. # get_pids ($exe) # Usage: Call with an exe name, e.g. /p4/1/bin/p4web_1 # # Example: # p4web_pids=$(get_pids $P4WEBBIN) # p4broker_pids=$(get_pids $P4BROKERBIN) # This implementation works on Mac OSX and a variety of Unix/Linux systems. get_pids () { exe=$1 pids=$($PS -ef|$GREP "${exe}"| $GREP -v " $GREP " | $GREP -v "${exe}_init " | $AWK '{print $2}') echo $pids }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 20726 | Robert Cowham | Catch up from dev | ||
#1 | 18586 | Robert Cowham | Branching using cowhamr.sdp.dev | ||
//guest/perforce_software/sdp/dev/Server/Unix/p4/common/bin/ps_functions.sh | |||||
#4 | 16029 | C. Thomas Tyler |
Routine merge to dev from main using: p4 merge -b perforce_software-sdp-dev |
||
#3 | 12169 | Russell C. Jackson (Rusty) |
Updated copyright date to 2015 Updated shell scripts to require an instance parameter to eliminate the need for calling p4master_run. Python and Perl still need it since you have to set the environment for them to run in. Incorporated comments from reviewers. Left the . instead of source as that seems more common in the field and has the same functionality. |
||
#2 | 12028 | C. Thomas Tyler | Refreshed SDP dev branch, merging down from main. | ||
#1 | 10638 | C. Thomas Tyler | Populate perforce_software-sdp-dev. | ||
//guest/perforce_software/sdp/main/Server/Unix/p4/common/bin/ps_functions.sh | |||||
#1 | 10148 | C. Thomas Tyler | Promoted the Perforce Server Deployment Package to The Workshop. |