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:
- how long has nodejs server been running?
- how many current socket.io connections in use along socket.ids?
- 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:
how can determine how long node.js has been running , deliverd info webinterface?
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
Post a Comment