The uptime command and Hive

From Wiki

Jump to: navigation, search


Can I use the uptime command for page loads when running HIVE?


The uptime command is not available by default when running HIVE. It requires libproc and also requires /proc to be mounted as it reads all of its data from there.

If you want to enable the uptime command for your server while using Hive, follow the instructions below:

UPDATE: 04.Oct.2011: Read this article on how to enable /proc

  1. You have to first copy all libraries that a command requires before it actually begins to work.
  2. You should have the necessary files in /proc so you should either:
    1. you either mount the /proc inside the chroot
    2. create a directory with the text files needed by the uptime command and thus lie to the command.

IMPORTANT: We don't encourage mounting of the /proc filesystem inside the chroot because it may pose a security risk. But if you really need to you can mount it at /var/suexec/baseos/proc.

The commands you should use are:

mkdir /var/suexec/baseos/proc
mount --bind /proc /var/suexec/baseos/proc

What those command will do is:

Create the /var/suexec/baseos/proc directory.
Mount bind the /proc in /var/suexec/baseos/proc.

Then clear the users' mounts by running:

/etc/init.d/suexec-chroot clean
Personal tools