BYTEMARK HOSTING SITE MAP

Hosting services | Connectivity | Support | Company | Software | Order now

Reference for admin shell

This is the full command reference for the admin shell, and is simply the collected list of help text available in the shell itself with the help command.

autoreboot
Syntax: autoreboot [on|off]
Sets whether the VM will reboot automatically after being halted.
If a setting isn't specified, will print the current setting.
cad
Syntax: cad
Equivalent to pressing Ctrl + Alt + Delete on the console; it should trigger
the machine's halt sequence.
consoles
Syntax: consoles
Connects your login session to all your Virtual Machine's available consoles
and serial lines.  Once you have started a console session, you can use 
"magic" keystroke sequences to switch between the various consoles:

   Ctrl+A 0      will switch back to the admin shell
   Ctrl+A N      will switch to the next console / serial line
   Ctrl+A P      will switch to the previous console / serial line
   Ctrl+A Ctrl+A will switch backwards and forwards between the last 
                   two screens.
   Ctrl+A Ctrl+\ will kill your console session and return to the admin shell

Note that when you connect to the console you may just see a blank screen;
this may be because a getty isn't running on the serial line.  Try pressing
Ctrl+A 1 to switch to the first screen, or hitting return a few times to 
get a login prompt.  Also you will (currently) need to reconnect to the admin
shell if you want to use consoles twice in a session.

The terminal program is really GNU screen although many functions have been
disabled for security reasons.
exit
Syntax: exit
Exits the admin console.
fastdisc
Syntax: fastdisc [on|off]
Switches on faster disc access.  Fast disc access is unsafe in the event
of power failure, and may result in filesystem corruption (even if your VM
is using a journalled filesystem).  Fast disc access was "on" for all Bytemark
VMs before 2004-02-23 but has now defaulted to off.

After changing this setting you should halt your VM to activate it.
go
Syntax: go
Resumes the machine after you've typed stop.
help
Syntax: help [command or topic]
Prints help on a particular command or topic.  If no command is specified,
all possible commands or topics are listed.
kernel
Syntax: kernel [kernel name]
Sets the name of the kernel which will be used after future reboots, or
lists those available (and which is currently selected) if you don't
supply a name.
passwd
Syntax: passwd
Changes your admin console password.  This does not affect the root password
to your machine.
rdns
Syntax: rdns show
Syntax: rdns set <IP address> <new reverse DNS entry>
Shows the IP addresses allocated to your machine, and their associated
reverse DNS entries.  You can also set the entry for a particular IP address
which will be updated on our servers within 10 to 20 minutes.
reimage
Syntax: reimage [distribution]
This command allows you to reinitialise your virtual machine, installing a pristine copy of a distribution upon it.

Note: all your data will be lost, so take backups prior to reimaging your machine if you have data you wish to keep.

rescueboot
Syntax: rescueboot [init program]
Starts your machine at the console, optionally telling the kernel to use
a different init program, e.g. /bin/sh should give you immediate control of
your VM.

The machine must be halted and autoreboot set to off before you use this
command.
rescuehalt
Syntax: rescuehalt
Tries two methods of halting the machine when 'cad' does not work.
Firstly it asks the kernel to unmount its discs and halt.
Then if the kernel doesn't answer, it will be forcibly terminated.
root
Syntax: root <root device>
Sets the device to use as the root filesystem.  Defaults to /dev/ubd/2 but
can be changed in special circumstances.  Call without an argument to show
the current setting.
sshkey_add
Syntax: sshkey_add <line from your id_rsa.pub>
Allows a single ssh2 key to be used to log in automatically, so you will not
need to type a password if this key is presented by your ssh client in future.
If you have already specified an ssh2 key, invoking this command again will
override the last one.
sshkey_del
Syntax: sshkey_del
Stops your specified ssh2 key from being used to log in automatically, and 
future logins will demand your password.
status
Syntax: status
Shows some statistics on the machine: up or downtime, and the current reboot
setting.
stop
Syntax: stop
Suspends the machine until you type go.
sysrq
Syntax: sysrq <letter>
Sends a "Magic System Request" command to the kernel which can perform varaious
emergency operations such as unmounting all filesystems or killing all 
processes.
tz
Syntax: tz
Syntax: tz [new timezone]
Syntax: tz list [search]
With no parameters specified, shows the currently set time zone.

With a time zone supplied, sets the current time zone.

With the "list" parameter supplied, shows all time zones that contain the given
letters e.g. "tz Paris" will give you "Europe/Paris", and will list every time
zone if none is supplied
uptime
Syntax: uptime
Shows the load average and uptime of the host machine.
version
Syntax: version
Shows the version of the currently booted VM kernel (use kernel to see the
one that will be booted next time).
watchdog
Syntax: watchdog add <rule specification> action <email | sms | reboot>
Syntax: watchdog del <rule number>
        watchdog list

Controls the watchdog, which continually monitors your VM and notifies you
of any problems with its operation by email or text message to your mobile
phone.
watchdogchecks
Syntax: watchdog add <test name> HTTPFetch <ip> <port> <vhost> <path> <status> <oktext> action <sms|email|reboot>

        ip : IP address to check
      port : Port number to try
     vhost : Virtual host to query server for
      path : Path to query server for
    status : Expected status code (usually 200)
    oktext : Text to check for in response

Syntax: watchdog add <test name> TCPConnect <ip> <port> action <sms|email|reboot>

        ip : IP address to check
      port : Port number to try

Syntax: watchdog add <test name> TCPBanner <ip> <port> <okbanner> action <sms|email|reboot>

        ip : IP address to check
      port : Port number to try
  okbanner : Banner string to check for

Syntax: watchdog add <test name> Ping <ip> action <sms|email|reboot>

        ip : IP address to check
watchdogexamples
  <mymachine> watchdog add "Machine up" Ping 194.153.169.1 action reboot

This will reboot your machine if it stops responding to pings

Topics:

Obsolete VirtualMachine

© 2006 Bytemark Hosting. All rights reserved