Sponsored Content
Top Forums Shell Programming and Scripting Disk Space availability on solaris machine Post 302297886 by raghu.amilineni on Monday 16th of March 2009 04:54:38 AM
Old 03-16-2009
Java Disk Space availability on solaris machine

Hi,

I have a question regarding finding free space on the disk of a solaris machine.

Many mount points are available in my machine. Right now i am using
df -b option to get the free disk space available.

I have an assignment to check free space on the disk.
I pass the directory as a parameter to my shell script. My shell script should read the parameter and check wether there is a sufficient space in the directory.

my inputs can be any of the follwing

/opt/Agent
/var/tmp
/var/opt/Agent
/Agent

I execued my command like this.

sh checkspace.sh /var/tmp

when the above command is executed i am getting correct result because /var/tmp exists on the machine.

if i specify sh checkspace.sh /Agent
the program halts with an error saying

block device not found.

this is because the directory is not existing.


can any one please give a solution to find free disk space when inputs /Agent and /opt/Agent are specified . the code should be same for both inputs.(should also remember /Agent is not an existing directory)


Thanks in advance
RaghuDeep Amilineni

Last edited by raghu.amilineni; 03-16-2009 at 06:13 AM..
raghu.amilineni
 

9 More Discussions You Might Find Interesting

1. Solaris

Disk space management on Solaris

Hi, I'm using sun solaris. Using df -h I have the following: Filesystem size used avail capacity Mounted on /dev/md/dsk/d2 12G 7.1G 4.6G 61% / /proc 0K 0K 0K 0% /proc mnttab 0K 0K 0K 0% ... (5 Replies)
Discussion started by: HSN
5 Replies

2. UNIX for Advanced & Expert Users

How to re-allocate disk space on solaris 10

I am not very good at UNIX and seek help here. I tried to install Oracle 10g on a 64 bit Sun sparc machine with solaris 10 as OS. After I installed solaris 10, the current file system on the machine looks like this: /dev/dsk/c0t0d0s0 5104758 4854293 199418 97% / /devices ... (2 Replies)
Discussion started by: duke0001
2 Replies

3. Solaris

command to find free disk space on solaris

In linux df is the command to find free space what is the equivalent command in the Solaris (2 Replies)
Discussion started by: harishankar
2 Replies

4. Programming

How to get free disk space size in C/C++ program( Solaris system)

How to get free disk space size in C/C++ program( Solaris system)? Is there any standard function or system function? Just like "df" or "getdfree" in Linux. (4 Replies)
Discussion started by: yidu
4 Replies

5. Solaris

solaris 8 / disk space almost full

Hi All, My Solaris 8 firewall server is getting full on the / filesystem. I don't know which one should I delete. I think there's no more to delete on the file like logs or temp file. Does someone knows about deleting a safe file (or folder) on FS like /usr, /opt, /platform, /kernel, /sbin?... (7 Replies)
Discussion started by: itik
7 Replies

6. Solaris

How to utilize the 2nd hard disk space in x86 solaris 5.10

I have 2 hard disks ,one hard disk(40gb) completely for windows Os,and the other(120gb) for solaris Os. In the second hard disk.I have utilised around 10gb for the solaris installation and also partitioned with the available 10gb space for the solaris x86 OS. Now i need to utilise the... (8 Replies)
Discussion started by: jayaprakash
8 Replies

7. Solaris

disk space solaris 10

I got 4 hd each of 75GB. The os sun solaris 10 is installed on disk 0 and is almost full. see at df -k shows the following $ df -k Dateisystem kByte belegt verfügbar Kapazität Eingehängt auf /dev/dsk/c1t0d0s0 6856805 6388140 400097 95% / /devices 0 ... (3 Replies)
Discussion started by: j2me
3 Replies

8. Solaris

How to create mirror disk in solaris machine?

hi, I'm newbie in Solaris 10. can someone explain me the steps of how to create mirror disk in Solaris machine. thanks in advance (5 Replies)
Discussion started by: Wong_Cilacap
5 Replies

9. Solaris

Df -k command shows duplicate information in Solaris machine, How to get the exact disk space

While getting the total disk space in solaris machine using df -k command, i am getting the same disk info for every user available in that system. Is there any way to remove it. Filesystem 1024-blocks Used Available Capacity Mounted on rpool/ROOT/solaris 573898752... (3 Replies)
Discussion started by: prasankn
3 Replies
cmsnmpd(1m)															       cmsnmpd(1m)

NAME
cmsnmpd - SNMP subAgent that services the High Availability cluster MIB objects SYNOPSIS
cmsnmpd DESCRIPTION
cmsnmpd is a subAgent that together with the SNMP Master Agent (snmpdm), form the SNMP Agent for a particular system. The cmsnmpd provides the instrumentation for the High Availability cluster MIB objects. The cmsnmpd is a separate process, yet registers with the SNMP Master Agent, and the two share a procedural interface. Traps The cmsnmpd sends asynchronous event notifications called "traps". By default, SNMP traps are not sent to any destination. To configure the agent to send traps to one or more specific destinations, add the trap destinations to /etc/SnmpAgent.d/snmpd.conf. The SNMP Master Agent and the cmsnmpd collaborate to send High Availability cluster-related traps and information. For example, a trap is sent when the cluster configuration changes, or when a Highly Available package has failed. A complete list of all the cluster-related traps can be found on systems with OpenView installed. On an OpenView management station, the trap descriptions can be found in /etc/opt/OV/share/conf/$LANG/trapd.conf. Supported MIB Objects The Management Information Base (MIB) is a conceptual database of values on the agent system. The cmsnmpd implements the hp-cluster and hp-sgcluster MIB objects. Included in these MIBs are descriptions of the cluster configuration, as well as the current status of each cluster component. A complete list of all the High Availability MIB objects can be found on systems with OpenView installed. On an Open- View management station, the MIB object descriptors can be found in /etc/opt/OV/share/conf/snmpmib. cmsnmpd Startup Startup is controlled by the setting of the AUTOSTART_CMSNMPD variable in the /etc/rc.config.d/cmsnmpagt file. If AUTOSTART_CMSNMPD is set to 1, the cmsnmpd is started automatically each time the system boots. The variable should be set to 1 if you will be using ClusterView to monitor your Highly Available clusters through OpenView. If AUTOSTART_CMSNMPD is set to 0, the cmsnmpd is not started automatically when the system boots. If configured for autostart, the cmsnmpd should startup automatically, after the SNMP Master Agent starts, each time the system reboots, or any time the system transitions from run level 1 to run level 2. When the system enters run level 2, the system will execute /sbin/init.d/SnmpMaster which will start the Master Agent. Similarly, /sbin/init.d/cmsnmpagt will start the cmsnmpd immediately after the Master Agent is started. Prior to executing these startup scripts the system will examine all scripts in /etc/rc.config.d for environment variables which could potentially influence the startup of the Master Agent and the cmsnmpd. See the specific startup script or configuration file for details on supported environment variables. The user should never modify scripts in /sbin/init.d. Instead, the startup behavior should be con- trolled by adjusting values in the configuration script /etc/rc.config.d/cmsnmpd. There are two ways to start the SNMP Master Agent and the cmsnmpd manually. The first way is to execute snmpdm and then start cmsnmpd by invoking the cmsnmpd executable (/usr/lbin/cmsnmpd). The second and simplest way to start the SNMP Agent manually is to execute the snmpd startup script which will invoke the Master Agent and all subAgents who have been installed and designed to operate in this paradigm. The snmpd startup script is layered upon the V.4 startup paradigm and so makes use of the component startup scripts in /sbin/init.d and configuration scripts in /etc/rc.config.d. When snmpd is invoked it passes all its command line arguments to snmpdm and then executes each script found in /sbin/SnmpAgtStart.d. DEPENDENCIES
None. AUTHOR
cmsnmpd was developed by Hewlett-Packard. FILES
/usr/lbin/cmsnmpd /sbin/init.d/cmsnmpagt /etc/rc.config.d/cmsnmpagt /var/adm/SGsnmpsuba.log SEE ALSO
snmpd(1m), snmpd.conf(4). Requires Optional Serviceguard Software cmsnmpd(1m)
All times are GMT -4. The time now is 11:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy