Tags

, ,

How to list running services

$ netstat -an|grep LISTEN
tcp   0   0 0.0.0.0:993      0.0.0.0:*     LISTEN
tcp   0   0 0.0.0.0:995      0.0.0.0:*     LISTEN
tcp   0   0 127.0.0.1:3306   0.0.0.0:*     LISTEN
tcp   0   0 0.0.0.0:110      0.0.0.0:*     LISTEN
tcp   0   0 0.0.0.0:143      0.0.0.0:*     LISTEN
tcp   0   0 0.0.0.0:2000     0.0.0.0:*     LISTEN
tcp   0   0 0.0.0.0:80       0.0.0.0:*     LISTEN
tcp   0   0 0.0.0.0:25       0.0.0.0:*     LISTEN
tcp   0   0 0.0.0.0:443      0.0.0.0:*     LISTEN

How to check if the elasticsearch is running

$ curl -XGET 'localhost:9200'
{
  "status" : 200,
  "name" : "Galactus",
  "version" : {
    "number" : "1.0.1",
    "build_hash" : "5c03844e1978e5cc924dab2a423dc63ce881c42b",
    "build_timestamp" : "2014-02-25T15:52:53Z",
    "build_snapshot" : false,
    "lucene_version" : "4.6"
  },
  "tagline" : "You Know, for Search"
}

..

To check what process running on port 25

$ sudo netstat -tulnap | grep :25
...
...
tcp   0   0 :::25   :::*   LISTEN   6457/node

So to check the absolute path of a running process, for example, processID 6457

$ sudo pwdx 6457
6457: /var/www/mywebapp
...

Tuara!! we found it, its inside the /var/www/mywebapp

Advertisements