...
- Visibility: Public
- Change Control: Stable
- Synopsis: Systemd can be used to start and stop PBS services on systems which supports systemd.
- Details: From 15.0 release, systemd commands can be used on supported systems.
- Systems which supported systemd are: suse >=1210 and rhel >=7
- sysvinit script will be still present in the same location, and this functionality is not deprecated.
- Usagesysvinitalternative in systemd
starting /etc/init.d/pbs start systemctl start pbs stopping /etc/init.d/pbs stop systemctl stop pbs status /etc/init.d/pbs status systemctl status pbs restart /etc/init.d/pbs restart systemctl restart pbs - The logs which are displayed in stdout from /etc/init.d/pbs are not displayed during systemd start up.
- But these logs can be seen with systemctl status command.
[root@vbox pbspro]# systemctl status pbs
● pbs.service - Portable Batch System
Loaded: loaded (/opt/pbs/default/libexec/pbs_init.d; enabled; vendor preset: disabled)
Active: active (running) since Wed 2016-08-10 15:23:48 IST; 21h ago
Docs: man:pbs(8)
Process: 101261 ExecStart=/opt/pbs/default/libexec/pbs_init.d start start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/pbs.service
├─104185 /opt/pbs/default/sbin/pbs_comm
├─104229 /opt/pbs/default/sbin/pbs_mom
├─104267 /opt/pbs/default/sbin/pbs_sched
├─104582 /opt/pbs/default/sbin/pbs_ds_monitor monitor
├─104645 /opt/pbs/14.101/pgsql/bin/postgres -D /var/spool/PBS/datastore -p 15007
├─104648 postgres: logger process
├─104651 postgres: checkpointer process
├─104652 postgres: writer process
├─104653 postgres: wal writer process
├─104654 postgres: autovacuum launcher process
├─104655 postgres: stats collector process
├─104771 postgres: pbsdata pbs_datastore 192.168.153.140(44113) idle
└─104772 /opt/pbs/default/sbin/pbs_server.binAug 10 15:23:44 vbox pbs_init.d[101261]: PBS sched
Aug 10 15:23:44 vbox su[104295]: (to pbsdata) root on none
Aug 10 15:23:44 vbox su[104357]: (to pbsdata) root on none
Aug 10 15:23:45 vbox su[104446]: (to pbsdata) root on none
Aug 10 15:23:45 vbox su[104510]: (to pbsdata) root on none
Aug 10 15:23:45 vbox su[104583]: (to pbsdata) root on none
Aug 10 15:23:48 vbox pbs_init.d[101261]: Connecting to PBS dataservice....connected to PBS dataservice@vbox
Aug 10 15:23:48 vbox pbs_init.d[101261]: Licenses valid for 1000000 Floating hosts
Aug 10 15:23:48 vbox pbs_init.d[101261]: PBS server
Aug 10 15:23:48 vbox systemd[1]: Started Portable Batch System.
- If the start up is failed the command will throw an error as follows -
[root@vbox nithinj]# systemctl start pbs
Job for pbs.service failed because the control process exited with error code. See "systemctl status pbs.service" and "journalctl -xe" for details.
- "systemctl status pbs" or "journalctl -u pbs" will lead to the specific reason behind the failure.
- The following command can be used to start PBS using systemd after the installation - "systemctl daemon-reload pbs && systemctl start pbs"
daemon-reload is used to reload all systemd units if they are got modified or newly added. - Possible Enhancements in future: We can convert start up script into C/C++ binary so that system start up will become more faster.
- "systemctl enable pbs" This will enable PBS to be started on bootup.