Skip to content

Maintenance

Amy Buck edited this page Nov 16, 2018 · 4 revisions

This information describes how to manage Linux packages and system services.

Manage Linux packages

Use standard Linux utilities to manage Linux packages. These utilities provide a simple way to retrieve and install packages from multiple sources using the Linux command line.

Before installing a package, you must first configure the IP address of the Management port (see Operations).

NOTE: Ensure that the URLs in the sources list configuration files point to the proper repository before installing a Linux package.

Use the apt-get update command before installing a package, and use the dpkg —s package_name command to check the installation status of a particular package.

System services

To check the status of a service, use the service service_name status command to check if the service is up and running, or inactive.

Check service status

$ systemctl status opx-pysnmp 
  opx-pysnmp.service - PySNMP agents 
   Loaded: loaded (/lib/systemd/system/opx-pysnmp.service; enabled) 
   Active: active (running) since Fri 2018-11-02 17:34:15 UTC; 30s ago
Main PID: 393 (SNMPAgent) 
   CGroup: /system.slice/opx-pysnmp.service 
           └─393 /usr/bin/python /usr/sbin/SNMPAgent
November 04 11:39:15 OPX systemd[1]: Started PySNMP agent.

Stop service

$ systemctl stop opx-pysnmp
$ service opx-pysnmp status
  opx-pysnmp.service - PySNMP agents
   Loaded: loaded (/lib/systemd/system/opx-pysnmp.service; enabled)
   Active: inactive (dead) since Fri 2018-11-02 11:38:56 UTC; 1s ago
  Process: 1229 ExecStart=/usr/sbin/SNMPAgent (code=killed, signal=KILL)
Main PID: 1229 (code=killed, signal=KILL)

November 04 11:38:56 OPX systemd[1]: Stopped PySNMP agent.

Start service

$ systemctl start opx-pysnmp
$ service opx-pysnmp status
  opx-pysnmp.service - PySNMP agents
   Loaded: loaded (/lib/systemd/system/opx-pysnmp.service; enabled)
   Active: active (running) since Fri 2018-11-02 17:36:04 UTC; 18h ago
Main PID: 1229 (SNMPAgent)
   CGroup: /system.slice/opx-pysnmp.service
           └─1229 /usr/bin/python /usr/sbin/SNMPAgent

November 04 11:39:15 OPX systemd[1]: Started PySNMP agent.

Restart service

$ systemctl restart opx-pysnmp
$ service opx-pysnmp status
  opx-pysnmp.service - PySNMP agents
   Loaded: loaded (/lib/systemd/system/opx-pysnmp.service; enabled)
   Active: active (running) since Fri 2018-11-03 11:39:15 UTC; 1s ago
Main PID: 2507 (SNMPAgent)
   CGroup: /system.slice/opx-pysnmp.service
           └─2507 /usr/bin/python /usr/sbin/SNMPAgent

November 04 11:39:15 OPX systemd[1]: Started PySNMP agent.
Clone this wiki locally