The following document contains the results of Rat (Release Audit Tool).
*****************************************************
Summary
-------
Generated at: 2017-03-11T23:53:12-05:00
Notes: 0
Binaries: 0
Archives: 0
Standards: 35
Apache Licensed: 19
Generated Documents: 0
JavaDocs are generated, thus a license header is optional.
Generated files do not require license headers.
15 Unknown Licenses
*****************************************************
Files with unapproved licenses:
C:/projects/fgsms/fgsms-agents/fgsms-osagent/nbactions.xml
C:/projects/fgsms/fgsms-agents/fgsms-osagent/pom.xml
C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/AgentThreadRunner.java
C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/callbacks/AdminCommand.java
C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/Closable.java
C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/OSAgent.java
C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/OSAgentDaemon.java
C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/sensor/ISensorProvider.java
C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/sensor/SensorProviderFactory.java
C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/resources/log4j.properties
C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/resources/sensor.properties
C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/scripts/fgsms
C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/scripts/postinstall.sh
C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/test/java/org/miloss/fgsms/osagent/callbacks/RemoteAgentCallbackImplTest.java
C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/test/java/org/miloss/fgsms/osagent/OSAgentTest.java
*****************************************************
*****************************************************
Files with Apache License headers will be marked AL
Binary files (which do not require any license headers) will be marked B
Compressed archives will be marked A
Notices, licenses etc. will be marked N
!????? C:/projects/fgsms/fgsms-agents/fgsms-osagent/nbactions.xml
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/OSAgentServiceInstall.cmd
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/OSAgentServiceInstallIA64.cmd
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/OSAgentServiceInstallWithDEBUG.cmd
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/OSAgentServiceInstallWithDEBUGIA64.cmd
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/OSAgentServiceInstallWithDEBUGx64.cmd
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/OSAgentServiceInstallx64.cmd
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/OSAgentServiceRemove.cmd
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/OSAgentServiceRemoveIA64.cmd
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/OSAgentServiceRemovex64.cmd
!????? C:/projects/fgsms/fgsms-agents/fgsms-osagent/pom.xml
!????? C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/AgentThreadRunner.java
!????? C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/callbacks/AdminCommand.java
C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/callbacks/RemoteAgentCallbackImpl.java
!????? C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/Closable.java
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/Df.java
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/Ifconfig.java
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/Iostat.java
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/MemWatch.java
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/NetInfo.java
!????? C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/OSAgent.java
!????? C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/OSAgentDaemon.java
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/ProcFileInfo.java
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/ProcInfo.java
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/Ps.java
!????? C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/sensor/ISensorProvider.java
!????? C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/sensor/SensorProviderFactory.java
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/SigarCommandBase.java
AL C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/SysInfo.java
!????? C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/resources/log4j.properties
!????? C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/resources/sensor.properties
!????? C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/scripts/fgsms
!????? C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/scripts/postinstall.sh
!????? C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/test/java/org/miloss/fgsms/osagent/callbacks/RemoteAgentCallbackImplTest.java
!????? C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/test/java/org/miloss/fgsms/osagent/OSAgentTest.java
*****************************************************
Printing headers for text files without a valid license header...
=====================================================
== File: C:/projects/fgsms/fgsms-agents/fgsms-osagent/nbactions.xml
=====================================================
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>run</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-Djava.library.path=${project.build.directory} -classpath %classpath org.miloss.fgsms.osagent.OSAgent</exec.args>
<exec.executable>java</exec.executable>
</properties>
</action>
<action>
<actionName>debug</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -Djava.library.path=${project.build.directory} -classpath %classpath org.miloss.fgsms.osagent.OSAgent</exec.args>
<exec.executable>java</exec.executable>
<jpda.listen>true</jpda.listen>
</properties>
</action>
<action>
<actionName>profile</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-Djava.library.path=${project.build.directory} -classpath %classpath org.miloss.fgsms.osagent.OSAgent</exec.args>
<exec.executable>java</exec.executable>
</properties>
</action>
</actions>
=====================================================
== File: C:/projects/fgsms/fgsms-agents/fgsms-osagent/pom.xml
=====================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
U.S. Government, Department of the Army
Army Materiel Command
Research Development Engineering Command
Communications Electronics Research Development and Engineering Center
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.mil-oss</groupId>
<artifactId>fgsms-agents</artifactId>
<version>7.0.0</version>
</parent>
<artifactId>fgsms-osagent</artifactId>
<packaging>jar</packaging>
<name>fgsms Operating System Agent</name>
<description>Operating system level agent for processes and the whole operating system</description>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mil-oss</groupId>
<artifactId>fgsms-common</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.mil-oss</groupId>
<artifactId>fgsms-common-interfaces</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
=====================================================
== File: C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/AgentThreadRunner.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.osagent;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author AO
*/
public class AgentThreadRunner implements Runnable{
public AgentThreadRunner()
{}
public AgentThreadRunner( String[] inargs)
{
this.args = inargs;
}
public String[] args;
protected OSAgent m= null;
@Override
public void run() {
try {
m=new OSAgent();
m.startup(args);
} catch (Exception ex) {
Logger.getLogger(AgentThreadRunner.class.getName()).log(Level.SEVERE, null, ex);
}
}
=====================================================
== File: C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/callbacks/AdminCommand.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.osagent.callbacks;
/**
* This is a container for working with administrative remote commands from fgsms administrators
* @author AO
*/
@Deprecated
public class AdminCommand {
String workingdir;
String command = new String();
String result_stderr = new String();
String result_stdout = new String();
int exitcode = 0;
long enqueuedat = -1;
long completedat = -1;
String id;
String authcode;
boolean waitfor = false;
private final RemoteAgentCallbackImpl outer;
AdminCommand(final RemoteAgentCallbackImpl outer) {
this.outer = outer;
}
}
=====================================================
== File: C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/Closable.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.osagent;
/**
* A wrapper to use for forcing the closing of a sigar handle
* @author AO
*/
public interface Closable {
/**
* Perform some clean up rutine
* @throws Exception
*/
public void close() throws Exception;
}
=====================================================
== File: C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/OSAgent.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.osagent;
import org.miloss.fgsms.osagent.sensor.ISensorProvider;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.RandomAccessFile;
import java.nio.channels.FileChannel;
import java.nio.channels.FileLock;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.HashSet;
import java.util.List;
import java.util.Properties;
import java.util.Set;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.Duration;
import java.util.Calendar;
import java.util.Iterator;
import java.util.UUID;
import org.miloss.fgsms.agentcore.ConfigurationException;
import org.miloss.fgsms.agentcore.OSAgentHelper;
import org.miloss.fgsms.agentcore.PersistentStorage;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.services.interfaces.common.*;
import org.miloss.fgsms.services.interfaces.datacollector.AddMachineAndProcessDataRequestMsg;
=====================================================
== File: C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/OSAgentDaemon.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.osagent;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author AO
*/
public class OSAgentDaemon {
private static AgentThreadRunner runner = null;
public static void start(String[] args) {
runner = new AgentThreadRunner(args);
t = new Thread(runner);
t.start();
}
static Thread t;
public static void stop(String[] args) {
if (t != null && t.isAlive() && runner != null) {
runner.m.running = false;
try {
t.join();
} catch (InterruptedException ex) {
Logger.getLogger(OSAgentDaemon.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
=====================================================
== File: C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/sensor/ISensorProvider.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.osagent.sensor;
import java.util.Properties;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
/**
* An interface for sensor data providers to implement. The result set of this
* call will be provided to the centralized fgsms server
* @author AO
*/
public interface ISensorProvider {
/**
* Called every iteration of the OS agent.
* @return
*/
public NameValuePair getSensorData();
/**
* Called on startup
* @param p
*/
public void init(Properties p);
/**
* called on OS agent shutdown. Use this function to clean up any external resources, such as serial ports
*/
public void stop();
}
=====================================================
== File: C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/java/org/miloss/fgsms/osagent/sensor/SensorProviderFactory.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.osagent.sensor;
import org.apache.log4j.*;
import org.miloss.fgsms.osagent.OSAgent;
/**
*
* @author AO
*/
public class SensorProviderFactory {
public static ISensorProvider getInstance(String classname) {
try {
return (ISensorProvider) Class.forName(classname).newInstance();
} catch (Exception ex) {
OSAgent.log.log(Level.FATAL, "can't load class", ex);
}
return null;
}
}
;
=====================================================
== File: C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/resources/log4j.properties
=====================================================
log4j.rootLogger=INFO, CONSOLE
log4j.appender.jaxws.JAXWSWebServiceMetaDataBuilder=ERROR,CONSOLE
log4j.appender.jaxws=ERROR,CONSOLE
log4j.appender.org.jboss.ws.metadata=ERROR,CONSOLE
log4j.appender.org.jboss.ws.metadata.builder=ERROR,CONSOLE
log4j.appender.org.jboss.ws.metadata.builder.MetaDataBuilder=ERROR,CONSOLE
log4j.appender.builder.MetaDataBuilder=ERROR,CONSOLE
log4j.appender.builder=ERROR,CONSOLE
log4j.appender.org.apache.cxf.service.factory.ReflectionServiceFactoryBean=ERROR,CONSOLE
log4j.appender.handler.HandlerChainExecutor=ERROR,CONSOLE
log4j.appender.handler=ERROR,CONSOLE
log4j.appender.soap.MessageContextAssociation=ERROR,CONSOLE
log4j.appender.httpclient.wire.content=WARN, CONSOLE
log4j.appender.httpclient.wire=WARN, CONSOLE
log4j.appender.org.apache.commons.httpclient=WARN, CONSOLE
log4j.appender.httpclient.wire.content=WARN, CONSOLE
log4j.appender.httpclient.wire=WARN, CONSOLE
log4j.appender.org.apache.commons.httpclient=WARN, CONSOLE
log4j.appender.umdm.EndpointMetaData==ERROR, CONSOLE
log4j.appender.handler.HandlerResolverImpl==ERROR, CONSOLE
log4j.appender.binding.BindingImpl==ERROR, CONSOLE
log4j.appender.jaxws.JAXWSWebServiceMetaDataBuilder==ERROR, CONSOLE
log4j.appender.utils.JBossWSEntityResolver==ERROR, CONSOLE
log4j.appender.fgsms.ServiceMixJMX=INFO,CONSOLE
log4j.appender.fgsms.Utility=INFO,CONSOLE
log4j.appender.fgsms.StatusBueller=INFO,CONSOLE
log4j.appender.fgsms.DataCollectorService=INFO,CONSOLE
log4j.appender.fgsms.DataAccessService=INFO,CONSOLE
log4j.appender.org.miloss.fgsms.common.AuditLogger=INFO,CONSOLE
log4j.appender.fgsms.UserIdentityUtil=INFO,CONSOLE
log4j.appender.fgsms.StatusBueller=INFO,CONSOLE
log4j.appender.fgsms.QpidPython=INFO,CONSOLE
log4j.appender.fgsms.QpidJMX=INFO,CONSOLE
log4j.appender.fgsms.DataPruner=INFO,CONSOLE
log4j.appender.fgsms.UDDIPublisher=INFO,CONSOLE
log4j.appender.fgsms.MulticastAlerting=INFO,CONSOLE
log4j.appender.fgsms.SLAProcessor=INFO,CONSOLE
#the following items are used for sending SLA Alerts to specific loggers. Configure them as necessary to pipe log output whereever you need it
log4j.appender.fgsms.SLAProcessor.SysLog=INFO,CONSOLE
log4j.appender.fgsms.SLAProcessor.UdpLog=INFO,CONSOLE
log4j.appender.fgsms.SLAProcessor.EventLog=INFO,CONSOLE
=====================================================
== File: C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/resources/sensor.properties
=====================================================
#this config file is used to mount sensor data providers for OS agent runtime.
#you can also add your own configuration data here, so long as it doesn't clash with someone else's settings
#sensorProviders=
### add any class that implements the ISensorProvider interface
### use a comma to seperate class names
=====================================================
== File: C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/scripts/fgsms
=====================================================
#!/bin/bash
#
# /etc/rc.d/init.d/fgsms
#
#
# fgsms starts and stops the fgsms OS Agent
#
# define where fgsms folder containing the OS agent
FGSMS_HOME=/opt/fgsms
# make sure java is in your path
JAVAPTH=${JAVAPTH:-"/usr/local/jdk/bin"}
start() {
echo -n "Starting Fine Grain Service Monitoring System OS Agent "
java -Dorg.miloss.fgsms.agentConfigFileOverride=$fgsms_HOME/fgsms-agent.properties -jar $fgsms_HOME/fgsms.OSAgent.jar > $fgsms_HOME/osagent.log 2>&1 &
}
stop() {
PROC_ID=`ps xa | grep 'fgsms.OSAgent' | grep java | grep -v grep | awk -F= 'BEGIN {FS=" "}; {print $1 }'`
if [[ -n "$PROC_ID" ]]; then
kill $PROC_ID
fi
}
status() {
PROC_ID=`ps xa | grep 'fgsms.OSAgent' | grep java | grep -v grep | awk -F= 'BEGIN {FS=" "}; {print $1 }'`
if [[ -n "$PROC_ID" ]]; then
echo -e 'fgsms OSAgent is running with process id: [\033[1;32m' $PROC_ID '\033[0m]'
RETVAL=0
else
echo -e 'fgsms OS Agent is \033[1;31m'stopped'\033[0m'
RETVAL=1
fi
}
case "$1" in
start)
start
;;
stop)
=====================================================
== File: C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/main/scripts/postinstall.sh
=====================================================
echo " "
/sbin/chkconfig --add fgsms
/etc/init.d/fgsms start
=====================================================
== File: C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/test/java/org/miloss/fgsms/osagent/callbacks/RemoteAgentCallbackImplTest.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.osagent.callbacks;
import org.miloss.fgsms.osagent.callbacks.RemoteAgentCallbackImpl;
import org.miloss.fgsms.services.interfaces.common.GetOperatingStatusRequestMessage;
import org.miloss.fgsms.services.interfaces.common.GetOperatingStatusResponseMessage;
import org.miloss.fgsms.services.interfaces.common.SecurityWrapper;
import org.miloss.fgsms.osagent.OSAgent;
import static org.junit.Assert.*;
import us.gov.ic.ism.v2.ClassificationType;
/**
*
* @author AO
*/
public class RemoteAgentCallbackImplTest {
public RemoteAgentCallbackImplTest() {
}
@org.junit.Before
public void setUp() throws Exception {
}
@org.junit.After
public void tearDown() throws Exception {
}
/*
@org.junit.Test
public void testExecuteTasks() throws Exception {
=====================================================
== File: C:/projects/fgsms/fgsms-agents/fgsms-osagent/src/test/java/org/miloss/fgsms/osagent/OSAgentTest.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.osagent;
import java.util.List;
import org.miloss.fgsms.osagent.OSAgent;
import javax.xml.datatype.DatatypeConfigurationException;
import org.miloss.fgsms.services.interfaces.common.SecurityWrapper;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
import org.miloss.fgsms.services.interfaces.common.DriveInformation;
import org.miloss.fgsms.services.interfaces.policyconfiguration.MachineInformation;
/**
*
* @author AO
*/
public class OSAgentTest {
public OSAgentTest() {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}