javascript - Node Js realtime server stats -


i learning more , more nodejs , have simple nodejs/socket.io chat program running on ec2 ubuntu instance proxied nginx. basic chat works, have web interface myself shows realtime view of happening nodejs server. here things know:

  1. how long has nodejs server been running?
  2. how many current socket.io connections in use along socket.ids?
  3. how many rooms open along room id , socket.ids in room.

i know how sockets , rooms inside nodejs using

io.sockets.adapter.rooms  //rooms 

and using

io.sockets //sockets 

to open sockets.

but don't know how "how long has node.js server been running"? 2 questions follows:

  1. how can determine how long node.js has been running , deliverd info webinterface?

  2. is way of finding current socket/room information best method? seems weird have inside of node.js , there not netstat type tool monitors nodejs outside.

i using ubunut 14.04 on ec2 nginx , nodejs/express/socket.io

**** edit

i using pm2 run nodejs service.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -