#!/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 #------------------------------------------------------------------------------ #------------------------------------------------------------------------------ # Version ID Block. Relies on +k filetype modifier. # VersionID='$Id: //p4-sdp/dev_c2s/Server/Unix/p4/common/bin/ps_functions.sh#2 $ $Change: 31472 $' # 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 | 31472 | C. Thomas Tyler |
Updated bash scripts and bash template to new file versioning scheme. Modernized template bash script. |
||
#1 | 31399 | C. Thomas Tyler | Populate -r -S //p4-sdp/dev_c2s. | ||
//p4-sdp/dev/Server/Unix/p4/common/bin/ps_functions.sh | |||||
#1 | 31397 | C. Thomas Tyler | Populate -b SDP_Classic_to_Streams -s //guest/perforce_software/sdp/...@31368. | ||
//guest/perforce_software/sdp/dev/Server/Unix/p4/common/bin/ps_functions.sh | |||||
#5 | 18767 | C. Thomas Tyler |
Fixed bug with proxy init script wrongly indicating proxy is up when it's not. |
||
#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. |