Tag: linux

How to check socket connection ?

How to check socket connection between filebeat, logstash and elasticseearch ?

netstat -anp | grep 9200
netstat -anp | grep 5044

a – Show all listening and non-listening sockets
n – numberical address
p – process id and name that socket belongs to

9200 – Elasticsearch port
5044 – Filebeat port

ESTABLISHED” status for the sockets that established connection between logstash and elasticseearch / filebeat.

LISTEN” status for the sockets that listening for incoming connections.

To view the count of socket, use

 wc -l

command

How to install npm and nodejs in offline on linux ?

How to install npm and nodejs in offline on linux ?

Download the latest Linux binaries from the site https://nodejs.org/en/download/

Extract it TAR file to the desired location.

cd /opt/mohan/
tar -xvf node-v6.11.0-linux-x64.tar.gz

set the soft link to npm and node

ln -s /opt/mohan/node-v6.10.3-linux-x64/bin/node /usr/bin/node
ln -s /opt/mohan/node-v6.10.3-linux-x64/bin/npm /usr/bin/npm

Check the npm  and node version

npm -v
node -v