Sponsored Content
Special Forums Hardware Filesystems, Disks and Memory Disk space and RAM status in UNIX Post 302319033 by myle on Saturday 23rd of May 2009 12:18:00 PM
Old 05-23-2009
I think you could give a try to sysinfo().
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Ram space

Hi, I am new to Unix and I need to know how to find out how much Ram I have on my server. I have Sun Solaris operating system with Sun Ulta 10 cpu. Could you please let me know the command to find the current Ram I have? Thank you. (1 Reply)
Discussion started by: hollowayt
1 Replies

2. UNIX for Dummies Questions & Answers

RAM, Hard Disk

Hi, I work in a production support environment. All our PROD machines SPARC machines and Solaris O/S. I want to know how to find out what the hard disk size, RAM size etc. of our PROD machines. Please let me know if there is any way to find out this (other than from system administrator). ... (2 Replies)
Discussion started by: ramaraju
2 Replies

3. UNIX for Dummies Questions & Answers

SCO Unix - Disk Space

Hi, I am using SCO Unix 3.12 and Informix database. When we tried to use "du -a" command to check disk space, it showed: 342122 ./usr 30092 ./etc 6244 ./dev 4778 ./bin 2674 ./tcb 1234 ./lost+found 698 ./lib 532 ./shlib 46 ./tmp 6 ./messages 4 ./opt 4 ./var 2 ./mnt 2 ./install... (1 Reply)
Discussion started by: trinhnguyen
1 Replies

4. Shell Programming and Scripting

Disk space details from Unix to Outlook

Hi Friends, I am using sun Solaris . I want to find the disk space (df -k) for the Unix box and the data has to be sent to an email id. Can u please find me a code that checks the disk space 6 times a day, loads the data into an excel sheet and sends to an email id. Can u also tell me how to... (2 Replies)
Discussion started by: sridharnr
2 Replies

5. Solaris

How much portion of RAM is allocated to Swap space?

How swap is getting 12GB as its size as per the below output: Filesystem size used avail capacity Mounted on /dev/md/dsk/d0 7.9G 2.1G 5.7G 27% / /devices 0K 0K 0K 0% /devices ctfs 0K 0K 0K 0% /system/contract proc 0K 0K 0K 0% /proc mnttab 0K 0K 0K 0% /etc/mnttab swap 12G 1.2M 12G 1%... (3 Replies)
Discussion started by: ramnagaraj
3 Replies

6. Programming

PC RAM and process address space

Suppose I have 3 gb of ram and 250 gb hard disk in my pc. Now I wrote a simple C program having only one statement malloc() to allocate 4 gb of memory as 32 bit os can address 4gb address space then will the malloc succeed? If yes then how it will get extra 1 gb of memory? Does the process gets... (3 Replies)
Discussion started by: rupeshkp728
3 Replies

7. Shell Programming and Scripting

DISK SPACE in UNIX

Hi, I have to regularly monitor manually if my diskspace is close to 90% or not. I use to see this by firing df -k. I want to write a script which can run 24*7 hours and would me mail me whenever the disk space is 90% or more..It would be really great if someone can helo me on this. (1 Reply)
Discussion started by: sachin4shell
1 Replies

8. AIX

How can we re-mount the RAM disk automatically after the reboot on AIX?

Hi All, I was trying to know more about RAM disk concept in AIX. I found something on IBM site. I was able to create and use/delete RAM disk as per IBM instructions. But as you guys know, this RAM disk is a temporary storage. (*when ever we reboot the AIX LPAR, content/RAM disk will be... (4 Replies)
Discussion started by: System Admin 77
4 Replies

9. Shell Programming and Scripting

Send Disk Space Usage Status via email

Hi Guys, Is there any way I can write a script that sends DISK SPACE USAGE STATUS via email once a week? Thanks, (5 Replies)
Discussion started by: g4v1n
5 Replies
df(1)							      General Commands Manual							     df(1)

NAME
df - Displays statistics on free disk space SYNOPSIS
[Tru64 UNIX] The default behavior for the df command is BSD SVR4 compliant. In this case, the df command uses the following syntax: df [-eiknP] [-t fstype] [file | file_system...] To cause the df command to exhibit XCU5.0 behavior, set the CMD_ENV environment variable to xpg4. In this case, the df command uses the following syntax: df [-eiknPt] [-F fstype] [file | file_system...] Note The CMD_ENV environment variable also affects the behavior of the echo command. The BIN_SH environment variable affects the XPG4 compli- ance of the Bourne shell. The df command displays statistics on the amount of free disk space on file_system or on the file system that contains the specified file. STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: df: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
Displays information about the mounted file systems, including the automount intercept point. [Tru64 UNIX] Displays statistics for the specified file system type only. If the no prefix is used, all file systems, except the one specified, are displayed. See the -t option description for a list of available file system types. [Tru64 UNIX] Reports the number of free inodes. The number of inodes controls the number of files that can exist in a file system. Reports Iused for AdvFS clone filesets as the number of files in use by the original file- set at the time the clone fileset was created. Causes the numbers to be reported in kilobytes. By default, all reported BSD compatible numbers are in 512-byte blocks. [Tru64 UNIX] Displays the previously obtained statistics from all mounted file systems. Use this option if it is possible that one or more file systems are in a state such that they will not be able to provide statistics without a long delay (for example, if you have a remote file system on a server that has crashed). If you specify the -n option, the df command does not request new statistics from the file systems; for some remote file systems, the statistics displayed may be too obsolete to be useful. Produces output that consists of one line of information for each specified file system, with reported numbers in 512-byte blocks (default). Includes total allocated space figures in the output (default). [Tru64 UNIX] (SVR4 environment only) Displays statistics for only the specified file system type. If the no prefix is used, all file systems, except the one specified, are displayed. Available file system types include the following: [Tru64 UNIX] UNIX File System (Berkeley fast file system) or a swap partition [Tru64 UNIX] Network File System (NFS), Version 2 protocol [Tru64 UNIX] Memory File System (RAM Disk) (See mfs(8)) [Tru64 UNIX] PC File System [Tru64 UNIX] System V File System [Tru64 UNIX] ISO 9660 or High Sierra Formatted (CD-ROM) File System [Tru64 UNIX] DCE Distributed File System [Tru64 UNIX] DCE Episode File System [Tru64 UNIX] Process File System (used by debuggers) [Tru64 UNIX] Advanced File System (AdvFS) [Tru64 UNIX] File on File mount (used by streams) [Tru64 UNIX] File Descriptor File System (used by streams) [Tru64 UNIX] Reserved for third-party file systems [Tru64 UNIX] Network File System, Version 3 protocol OPERANDS
The name of a file, or file system, about which information is solicited. If no value is specified, information is written on all mounted file systems. DESCRIPTION
[Tru64 UNIX] To obtain XCU5.0 compliance, set the environment variable CMD_ENV to xpg4. If the environment variable is not set or it is set to another value, the environment defaults to BSD SVR4. If neither a file or a file system is specified, statistics for all mounted file systems are displayed. [Tru64 UNIX] When file system disk usage exceeds 100% of the allowed space for users, the df command displays a negative number of free blocks. The allowed space for users is typically 90% of disk capacity, with 10% reserved for use by root only (this is not true for AdvFS, see below). Consequently as a result of this, the disk usage is under reported by approximately 10%. However, system administrators may specify either less or more reserved space for use by root. System V Compatibility [Tru64 UNIX] The root of the directory tree that contains the commands modified for SVID 2 compliance is specified in the file /etc/svid2_path. You can use /etc/svid2_profile as the basis for, or to include in, your /etc/svid2_profile reads /etc/svid2_path and sets the first entries in the PATH environment variable so that the modified SVID 2 commands are found first. [Tru64 UNIX] The df command, as modified for SVID 2 compliance, accepts one command line option (-t, print space totals) and an optional file system name or device name. The command displays the mount point, the mounted device, the number of free blocks (in 512-byte quanti- ties), and the number of free inodes. If the -t option is specified, the command displays, on a separate line following the free block counts, the total number of blocks and inodes for each mounted device. Advanced File System [Tru64 UNIX] For AdvFS file systems, the df command displays disk space usage information for each fileset. Because AdvFS uses a different design than UFS, the df command reflects disk space usage somewhat differently than UFS. [Tru64 UNIX] AdvFS uses a domain-fileset model rather than a one-file system-per-volume model like traditional UNIX file systems. A file- set can reside alone on a single-volume domain (a UFS model), alone on a multi-volume domain, or can share a single or multi-volume domain with other filesets. A fileset can consume all space in its domain or it may be constrained by fileset quotas. [Tru64 UNIX] AdvFS allows quotas to be established for filesets. Fileset quotas limit the amount of space that one fileset can use. For filesets that have quotas established, the 512-blocks, Avail, and Capacity values reflect limits imposed by quotas. They do not represent actual space available in the file domain unless there is less space in the domain than allowed by the quota limit. When both soft and hard limits are set, the lower limit is used to calculate totals. [Tru64 UNIX] The following is an explanation of each of the fields in the df command display for AdvFS file systems: [Tru64 UNIX] The complete fileset name. The syntax is domain_name#fileset_name. [Tru64 UNIX] The total amount of space in the file domain in which the fileset resides, represented in either 512K blocks or 1024K blocks. Metadata, which takes away space from the domain and is not available for filesets to use, is included as reserved in this total. This total represents: used+free+reserved. [Tru64 UNIX] When fileset quotas are imposed, this field represents the limit set by the fileset quota. [Tru64 UNIX] The total amount of space used by the fileset. When run against an AdvFS clone fileset, the number reported for Used blocks is the number of blocks used in the original fileset at the time the clone fileset was created. [Tru64 UNIX] The total amount of unused space in the domain available to the fileset. Because ALL unused space in the file domain is available to all of the filesets, this value is the same for all filesets in a domain, unless fileset quotas are established. [Tru64 UNIX] When fileset quotas are established, this value reflects the amount of space remaining until the quota limit is reached. If there is less available space in the domain than allowed by the quota limit, the available domain space is displayed. [Tru64 UNIX] How full the fileset is, represented as a percentage. This amount is calculated as: used/(used+available). In domains with multiple filesets, the total capacity of all filesets in that domain can be greater than 100%. This is because the available space value used in the calculation is available to all of the filesets; each fileset capacity is calculated independently. [Tru64 UNIX] The mount point of the fileset.On a TruCluster Server, showfsets can sometimes report incorrect disk usage. Data in CFS client caches is synchronized to the server at least every 30 seconds. Incorrect disk usage is reported if stale data exists in client caches when the showfsets executes. [Tru64 UNIX] Note On a TruCluster Server, df can sometimes report incorrect disk usage. Data in CFS client caches is synchronized to the server at least every 30 seconds. The disk usage reported does not account for dirty data in client caches that has not yet been synchronized to the server. RESTRICTIONS
[Tru64 UNIX] The df command supports mount point pathnames of up to MNAMELEN, which includes the null terminating character. EXIT STATUS
The following exit values are returned: Successful completion. An error occurred. ENVIRONMENT VARIABLES
The following environment variables affect the execution of df: [Tru64 UNIX] This variable must be set to xpg4 to cause the df command to exhibit XCU5.0 behavior. Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization variables contain an invalid setting, the util- ity behaves as if none of the variables had been defined. If set to a non-empty string value, overrides the values of all the other inter- nationalization variables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments). Determines the locale for the format and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. SEE ALSO
Commands: du(1), echo(1), find(1), ksh(1), mount(8), quot(8), quota(1), Bourne shell sh(1b), POSIX shell sh(1p), showfdmn(8), showfsets(8) Functions: fstatfs(2), mount(2), statfs(2), statvfs(2) Routines: getvfsbyname(3) Files: fs(4), fstab(4) Standards: standards(5) df(1)
All times are GMT -4. The time now is 10:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy