check service status from another system linux code example
Example 1: checking service status in linux
$ sudo service httpd status
httpd is stopped
Example 2: checking service status in linux
$ sudo service httpd start
Starting httpd: [ OK ]