mirror of
				https://github.com/librenms/librenms-agent.git
				synced 2024-05-09 09:54:52 +00:00 
			
		
		
		
	add support for SGE/rocks job tracker (#118)
This commit is contained in:
		
							
								
								
									
										22
									
								
								agent-local/rocks.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										22
									
								
								agent-local/rocks.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
# This program 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 3 of the License, or (at your
 | 
			
		||||
# option) any later version.  Please see LICENSE.txt at the top level of
 | 
			
		||||
# the source code distribution for details.
 | 
			
		||||
# @author     SvennD <svennd@svennd.be>
 | 
			
		||||
 | 
			
		||||
# required
 | 
			
		||||
source /etc/profile.d/sge-binaries.sh;
 | 
			
		||||
 | 
			
		||||
QSTAT="/opt/gridengine/bin/linux-x64/qstat"
 | 
			
		||||
RUNNING_JOBS=$($QSTAT -u "*" -s r | wc -l)
 | 
			
		||||
PENDING_JOBS=$($QSTAT -u "*" -s p | wc -l)
 | 
			
		||||
SUSPEND_JOBS=$($QSTAT -u "*" -s s | wc -l)
 | 
			
		||||
ZOMBIE_JOBS=$($QSTAT -u "*" -s z | wc -l)
 | 
			
		||||
 | 
			
		||||
echo $RUNNING_JOBS;
 | 
			
		||||
echo $PENDING_JOBS;
 | 
			
		||||
echo $SUSPEND_JOBS;
 | 
			
		||||
echo $ZOMBIE_JOBS;
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user