Kernel Commands

gsh provides a set of commands to control the GNO kernel. These commands mainly deal with job control. See the chapter on Process Management in the GNO Kernel Reference Manual.

bg (%job | pid)

Starts the specified job, if stopped, and places it in the background.

fg (%job | pid)

Starts the specified job, if stopped, and places it in the foreground.

jobs [-l]

Displays a list of the shell's jobs. If the -l switch is specified, the process id is included in the job list.

kill {[-SIGNAL] | %job | pid | [-l] }

The kill command will send the signal SIGNAL to the process number pid. The ps command documented below describes how to list all process ID's currently executing.

SIGNAL can be either a numeric value or string representing the signal to be sent to the process. All signals are documented in the chapter on Interprocess Communication in the GNO Kernel Reference Manual. Alternatively, specifying the -l option will list all the signals and their names.

If the process number isn't known, but the job number is, replace the pid with a '%' followed by the job number.


This command takes no arguments. When invoked, a list of all currently running processes is displayed:

[2] 9:52pm root> ls -lR :hard:gno > /ram5/dev &
[1] + 35 Running ls -lR :hard:gno &
[3] 9:53pm root> ps
   1 ready   co 1002 0000 0:26 NullProcess
   2 ready   co 1005 0000 0:02 gsh
  35 ready   co 100A 0000 0:01 ls -lR :hard:gno
  36 running co 1007 0000 0:00 ps
[4] 9:53pm root> 
[1] + Done ls -lR :hard:gno

The fields of the ps output are as shown below:


A unique process ID assigned to a command by GNO. Use this number to reference any process.


Current state of the process. Each process can be in any of the following states:


The process is currently in execution.


The process is not currently executing, but is ready to be executed as soon as it is assigned a time slice.


The process is waiting for a slow I/O operation to complete (for instance, a read from a TTY).


The process has been created, but has not executed yet.


The process was stopped with SIGSTOP, SIGTSTP, SIGTTIN, or SIGTTOU.


The process is waiting on a semaphore "signal" operation. Programs waiting for data from a pipe have this state.


The process is waiting to receive a SIGCHLD signal.


The process is waiting for any signal.


Terminal connected to the process.


Memory Manager ID assigned to the process.


ID of the user who initiated the process.


How much CPU time this process has used. This is not the elapsed time of the process.


Command-line string used to invoke process.

setdebug { val | {+|-}flag }

Turns GNO kernel debugging code on or off. The value passed consists of a bit field, where each bit specifies a different type of debugging code to activate. An alternate method is to provide a list of debug flags, either preceded by a '+' or a '-'. Those preceded by a '+' are activated, and those preceeded with a '-' are deactivated. All debugging is deactivated by passing a value of 0. Running setdebug wtth no arguments returns a list of the debugging flags. Legal flags include:

Table 2. Kernel Debug Flags

gsostrace Trace GS/OS calls.
gsosblocks Trace GS/OS parameter blocks.
gsoserrors Trace GS/OS errors.
pathtrace Trace GS/OS pathnames.
sigtrace Trace signals.
systrace Trace GNO Kernel system calls.

stop { %job | pid }

Stops the execution of all processes in a specified job.