Storage reporting and Printer access

Storage usage :

Unix/Linux provides several commands for monitoring disk usage. On large systems with many users, even small accumulations of files by many users can become a burden for the system. Additionally, poorly designed programs that generate excessive data or excessively large mail files or mail that is allowed to accumulate by users can adversely affect the system. The following commands report information about storage sizes.

df - disk free, lists disk usage on the partitions (filesystems) of the Unix system. It will list usage in block units, usually of 1k but options allow that to be varied. It will display total blocks on each filesystem, blocks available, blocks used, percentage in use, and filesystem name (mount point). One option, -i, will list inode usage rather than block storage. This command is primary interest to the system administrator to monitor overall resource usage.

du - disk usage, lists disk usage by blocks summarized for each directory under the specified directory or current directory if no directory named. It will also give a total of all blocks counted. If argument is a file other than a directory, it will list usage for only that file.

By listing usage by block, du gives a true reading of amount of space used. Remember that storage is allocated in block sizes and a 2 byte file will take one block of storage even if it only uses the 2 bytes.

Options :

quota - lists quota status. Unix systems provide a quota system that can be used to restrict both the total storage and the number of inodes (number of files) that a user can allocate. quota provides a two level restriction.

quota provides two limits. The quota or soft limit is the amount of storage allotted to the user. But because this limit may be exceeded in the middle of a task, the system still allows it be exceeded. However, the user will be warned this condition permitted for a limited time, perhaps 10 days, before the user is blocked from allocating additional storage.

The hard limit represents the level at which a user will be blocked from any further disk resource allocation.

The quota system must be activated for this command to produce output. If quota is not recognized, it is because it is not in use.


  • lp, lpr, enscript - alternative commands for sending output to the print system. lp and lpr are send data to the print queue system as is. enscript will convert the data to postscript format before delivering it to the print queue system.

    enscript -Plpcsl filelist_to_print

    The -P is the printer destination flag. The lpcsl is a name set by the administrator to route printing to the desired device. Names will vary from system to system.

  • lpstat - reports the status of the print queue system. lpstat can report the status of the Unix portion of the print system. However, if printers are maintained on a non-Unix system connected across a network, lpstat's reporting stops at the interface out of the system.

    Some lpstat options :

    -a accepting? Reports which printers are accepting jobs. If a specific printer named, only that printer will be checked.

    -o shows status of jobs queued up for printers. If a specific printer named, only that printer will be checked.

    -t show all status information. In many cases, this may be too much information.

    Communication
    Command List