You are not logged in.

#1 2012-07-08 04:19:20

iamdanhenry
Member
From: Behind my Monitors
Registered: 2011-12-31
Posts: 26
Website

[solved] Testing for running services.

Does anyone know of a good way to get a quick and dirty way of testing if specific services are on-line on a remote server.  It is for a conky setup, trying to test if things like http, mysql, ssh, imap, smtp, etc.
The servers are Debian.  All I need is an up/down status.

Thanks,
Daniel

Last edited by iamdanhenry (2012-07-09 16:38:17)


Personal Blog http://awebnerd.com/

Offline

#2 2012-07-09 12:27:31

-Syu
Member
Registered: 2012-01-24
Posts: 29

Re: [solved] Testing for running services.

If an open/closed status of the ports in question is enough for you, you'd best use nmap. You would use it to connect (or half-connect) at TCP level.
To see what kind of services run on those ports, you can also use nmap, but amap sometimes gives more specific results.

Offline

#3 2012-07-09 12:51:54

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [solved] Testing for running services.

Either try the service command or parse the output of /etc/init.d/myservice status.

Offline

#4 2012-07-09 13:10:24

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,693

Re: [solved] Testing for running services.

Scan the IP with nmap?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2012-07-09 13:31:20

-Syu
Member
Registered: 2012-01-24
Posts: 29

Re: [solved] Testing for running services.

@ ewaller: Scan the IP with nmap.

nmap -Pn -sV -p 80,3306,22,143,25 -iL <inputfilename>

@ Awebb: I agree, if the OP has shell access on the remote machines.

Offline

#6 2012-07-09 16:33:05

iamdanhenry
Member
From: Behind my Monitors
Registered: 2011-12-31
Posts: 26
Website

Re: [solved] Testing for running services.

ewaller wrote:

Scan the IP with nmap?

Thank you.

Last edited by iamdanhenry (2012-07-09 16:38:27)


Personal Blog http://awebnerd.com/

Offline

Board footer

Powered by FluxBB