Update documentation on sysv init script setup.

This commit is contained in:
Mark Nellemann 2022-08-27 10:30:18 +02:00
parent 36aadbd5cc
commit abef741218
9 changed files with 30 additions and 10 deletions

View File

@ -13,7 +13,7 @@ subprojects {
apply plugin: 'groovy'
dependencies {
testImplementation 'org.spockframework:spock-core:2.0-groovy-3.0'
testImplementation 'org.spockframework:spock-core:2.1-groovy-3.0'
testImplementation "org.slf4j:slf4j-api:${slf4jVersion}"
testImplementation "org.slf4j:slf4j-simple:${slf4jVersion}"

View File

@ -1,5 +1,5 @@
[Unit]
Description=Sysmon Client Service
Description=Sysmon Client
[Service]
#User=nobody

View File

@ -11,7 +11,7 @@
dir="/opt/sysmon/client"
cmd="/opt/sysmon/client/bin/client"
args="-s http://10.20.30.40:9925/metrics"
args="-s http://10.20.30.40:9925/metrics" # Specify sysmon-server URL here
user=""
name=`basename $0`
@ -19,6 +19,10 @@ pid_file="/var/run/$name.pid"
stdout_log="/var/log/$name.log"
stderr_log="/var/log/$name.err"
# Uncomment if required
#JAVA_HOME=/usr/java8_64
#export JAVA_HOME
get_pid() {
cat "$pid_file"
}

View File

@ -1,4 +1,4 @@
# SystemD Notes
# Linux systemd notes
Edit the *sysmon-client.service* file and change the sysmon-server URL accordingly to your environment.
@ -9,4 +9,4 @@ cp sysmon-client.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable sysmon-client
systemctl restart sysmon-client
```
```

View File

@ -1,6 +1,18 @@
# SysV init Notes
- Copy the *sysmon-client.sh* into *sysmon-client* in the correct location for init scripts on your operating system.
- Edit the file to specify sysmon-server URL in the *args* variable.
- Edit the file and specify the sysmon-server URL in the *args* variable.
- Edit the file and uncomment *JAVA_HOME* if required
- SymLink to the required run-levels.
## AIX & VIO
```shell
# Remember to edit and set JAVA_HOME to eg. /usr/java8_64
cp sysmon-client.sh /etc/rc.d/init.d/sysmon-client
chmod +x /etc/rc.d/init.d/sysmon-client
ln -s /etc/rc.d/init.d/sysmon-client /etc/rc.d/rc2.d/Ssysmon-client
ln -s /etc/rc.d/init.d/sysmon-client /etc/rc.d/rc2.d/Ksysmon-client
```

View File

@ -10,7 +10,7 @@ subprojects {
apply plugin: 'groovy'
dependencies {
testImplementation 'org.spockframework:spock-core:2.0-groovy-3.0'
testImplementation 'org.spockframework:spock-core:2.1-groovy-3.0'
testImplementation "org.slf4j:slf4j-api:${slf4jVersion}"
testImplementation "org.slf4j:slf4j-simple:${slf4jVersion}"
testImplementation project(':shared')

View File

@ -28,7 +28,7 @@ def projectName = "sysmon-server"
application {
// Define the main class for the application.
mainClass.set('sysmon.server.Application')
applicationDefaultJvmArgs = [ "-server", "-Xmx128m" ]
applicationDefaultJvmArgs = [ "-server", "-Xmx64m" ]
}
run {

View File

@ -19,6 +19,10 @@ pid_file="/var/run/$name.pid"
stdout_log="/var/log/$name.log"
stderr_log="/var/log/$name.err"
# Uncomment if required
#JAVA_HOME=/usr/java8_64
#export JAVA_HOME
get_pid() {
cat "$pid_file"
}

View File

@ -1,4 +1,4 @@
# SystemD Notes
# Linux systemd notes
Setup as systemd service to start automatically at boot:
@ -7,4 +7,4 @@ cp sysmon-server.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable sysmon-server
systemctl restart sysmon-server
```
```