running glances -w at startup (boot) ubuntu 14.04

3,725 views
Skip to first unread message

mult...@gmail.com

unread,
Sep 27, 2014, 9:17:56 PM9/27/14
to glance...@googlegroups.com
Hello,
how i can start glances web server when my server boots up? (Ubundu 14.04 LTS)
Thank you!

Nicolargo

unread,
Sep 30, 2014, 5:05:58 PM9/30/14
to glance...@googlegroups.com
Best way to process is to following: http://stackoverflow.com/questions/7221757/run-automatically-program-on-startup-under-linux-ubuntu

Be aware that there is a current issue in Glances with a memory leak on the Web server: https://github.com/nicolargo/glances/issues/422

Cristián Serpell

unread,
Jun 19, 2015, 11:05:37 PM6/19/15
to glance...@googlegroups.com
I am trying to do the same thing in Ubuntu 14.04, current glances package in Ubuntu 14.04 seems like an older version that doesn't have the -w option. I have othe rmachine with Ubuntu 15.04 and it works perfectly.

Juan Granados

unread,
Dec 29, 2015, 6:07:41 AM12/29/15
to Glances Users
When I run glances -w from command prompt I can connect to IP:61208.
If I run it at system startup by /etc/rc.local it hangs at loading start screen.

Should I run some command before?

Log shows no error:

Thanks

Christopher Rung

unread,
Jan 27, 2016, 10:02:28 PM1/27/16
to Glances Users
Hi Juan,

I just wrote a service (based on https://github.com/fhd/init-script-template) to run the glances webserver.  You only need to modify line 14 in the file; change [YOUR_USER_NAME] to your user name, so it says something like this:
user="clrung"

Put this file in /etc/init.d/glances, assign it to the root user and root group (sudo chown root:root), and make it executable to the root user (sudo chmod 755 /etc/init.d/glances).

Next, run sudo service glances start, and the glances webserver should be up and running!

After a service is started, it will run at boot (that's what the Default-Start: 2 3 4 5 part of the script does).
glances
Reply all
Reply to author
Forward
0 new messages