Previous | Table of Contents | Next |
To find out how long a system has been up, type uptime and press Return. The time, number of users, and load average are displayed for the local system:
castle% uptime 1:16pm up 4:57, 1 user, load average: 0.12, 0.06, 0.04 castle%
To find out when a system was booted, type who -b and press Return. The month, day, and time of the last boot are displayed:
oak% who -b . system boot Jul 14 Ø8:49 oak%
To display the system date and time, type date and press Return. The system date and time are displayed:
castle% date Tue Sep 16 13:17:03 PDT 1997 castle%
Follow these steps to reset the system date and time:
# su Password: # date Tue Jul 14 16:Ø7:Ø1 PST 1992 # date Ø7141552 Tue Jul 14 15:52:ØØ PST 1992 #
The time zone is set in the /etc/TIMEZONE file. The available U.S. time zone variables are shown below. Look in the /usr/share/ lib/zoneinfo directory for a complete list of time zone variables.:
Follow these steps to change the system time zone:
Here is an example of the /etc/TIMEZONE file for a system set to Pacific Standard/Pacific Daylight Time. Note that /etc/TIMEZONE is now a symbolic link to /etc/default/init:
castle% more /etc/TIMEZONE # @(#)init.dfl 1.2 92/11/26 # # This file is /etc/default/init. /etc/TIMEZONE is a symlink to this file. # This file looks like a shell script, but it is not. To maintain # compatibility with old versions of /etc/TIMEZONE, some shell constructs # (i.e., export commands) are allowed in this file, but are ignored. # # Lines of this file should be of the form VAR=value, where VAR is one of # TZ, LANG, or any of the LC_* environment variables. # TZ=US/Pacific castle%
Here is an example of how to change the time zone from Pacific to Eastern:
oak% su Password: # vi /etc/TIMEZONE TZ=US/East-Indiana;export TZ :w! # reboot oak% date Tue Jul 14 14:24:52 EST 1992 oak%
NOTE: You may need to make your text editor do a confirmed write of the file. For example, in vi use the command :w! to write the changes even if the permissions normally would not allow it.
To create and add additional swap space without reformatting a disk, first you create a swap file using the mkfile command. You can specify the size of the swap file in kilobytes (the default) or in blocks or megabytes by using the b and m suffixes, respectively. The swap file can either be on a local disk or be NFS-mounted. Then you add the swap space using the swap command.
To list available swap files, type swap -l and press Return. A list of available swap files is displayed. The swap command replaces the SunOS 4.x swapon command:
drusilla% swap -l swapfile dev swaplo blocks free swapfs - Ø 9452Ø 93512 /dev/dsk/cØt3dØs1 32,25 8 65512 45Ø48 drusilla%
Follow these steps to create a swap file:
oak% su Password: # mkfile 1m /files1/SWAP #
Previous | Table of Contents | Next |