Re: Unix System Services File Space Used

2008-07-15 Thread Veilleux, Jon L
I received this find command from an IBMer (Bill Schoen maybe). It will
list all of the files and directories contained in a physical HFS/zFS.
It only lists objects within a single MVS dataset. I use it to determine
who is using space within my root HFS:


The command I have come up with is:

find dir -xdev -type d -exec echo '\n\nDir= ' {} \; -exec ls -la {} \;

Where dir is the mountpoint for the mounted filesytem you want

to generate the report on.

   -xdevdon't cross filesystem boundaries

   -type d   only hit on directories

   -execThese two exec statements will output the directory name

 followed by the directory contents.

If you wish to redirect the output from this command to a file,

all you need to do is to append '  /tmp/datasetname.out ' to the

of the command. This will redirect the output to the file

/tmp/datasetname.out .   You can use any filename you wish, but

you might want to give the output file a name to identify the

dataset you are doing the find against.



Jon L. Veilleux 
[EMAIL PROTECTED] 
(860) 636-2683 

This e-mail may contain confidential or privileged information. If
you think you have received this e-mail in error, please advise the
sender by reply e-mail and then delete this e-mail immediately.
Thank you. Aetna   

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Unix System Services File Space Used

2008-07-15 Thread Klein, Kevin
Thanks everyone for your help.  We found some logs from z/Oses HTTP
server that were dumping into our root file system.  Problem resolved
(for now). 

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Klein, Kevin
Sent: Monday, July 14, 2008 1:59 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Unix System Services File Space Used

We have a zFS file at 4GB so it can't expand.  It happens to be our root
file system and it's full so I'm not able to create any more directories
off the root.  We don't think we should have 4GB of data on this file.
Is there a way to see which directories and/or files are using this
space, short of doing an ls on every directory?

Attention:
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material.  Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended
recipient is prohibited. If you received this in error, please contact
the sender and delete the material from any system and destroy any
copies.  (GWCC)



--
For IBM-MAIN subscribe / signoff / archive access instructions, send
email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search
the archives at http://bama.ua.edu/archives/ibm-main.html

Attention:
The information contained in this message and or attachments is intended only 
for the person or entity to which it is addressed and may contain confidential 
and/or privileged material.  Any review, retransmission, dissemination or other 
use of, or taking of any action in reliance upon, this information by persons 
or entities other than the intended recipient is prohibited. If you received 
this in error, please contact the sender and delete the material from any 
system and destroy any copies.  (GWCC)


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Unix System Services File Space Used

2008-07-15 Thread McKown, John
 -Original Message-
 From: IBM Mainframe Discussion List 
 [mailto:[EMAIL PROTECTED] On Behalf Of Klein, Kevin
 Sent: Tuesday, July 15, 2008 9:35 AM
 To: IBM-MAIN@BAMA.UA.EDU
 Subject: Re: Unix System Services File Space Used
 
 Thanks everyone for your help.  We found some logs from z/Oses HTTP
 server that were dumping into our root file system.  Problem resolved
 (for now). 

Ouch. For everything that creates a log, I put that in its own private
filesystem. Really helps, given how infrequently I remember to purge the
logs. I'm going to automate that some day.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it.  

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Unix System Services File Space Used

2008-07-15 Thread Mark Zelden
On Tue, 15 Jul 2008 09:35:06 -0500, Klein, Kevin [EMAIL PROTECTED] wrote:

Thanks everyone for your help.  We found some logs from z/Oses HTTP
server that were dumping into our root file system.  Problem resolved
(for now).


Just one of several good reasons to mount your root as read only.

Mark
--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:[EMAIL PROTECTED]
z/OS Systems Programming expert at http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Unix System Services File Space Used

2008-07-15 Thread Staller, Allan
Try /usr/lpp/tcpip/samples/rmoldlogs

snip
Ouch. For everything that creates a log, I put that in its own private
filesystem. Really helps, given how infrequently I remember to purge the
logs. I'm going to automate that some day.
/snip

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Unix System Services File Space Used

2008-07-15 Thread Lindy Mayfield
And also skulker for removing old stuff in general, for example in /tmp.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/BPXZA580/SKULKER



-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of 
Staller, Allan
Sent: 15. heinäkuuta 2008 21:08
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: Unix System Services File Space Used

Try /usr/lpp/tcpip/samples/rmoldlogs

snip
Ouch. For everything that creates a log, I put that in its own private
filesystem. Really helps, given how infrequently I remember to purge the
logs. I'm going to automate that some day.
/snip

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Unix System Services File Space Used

2008-07-15 Thread Aaron Walker
Yes, route your logs into a separate file system, and roll your logs.  Look
at the Logging and Reports section of Appendix B. Configuration
directives for the HTTP server.  Lots of good stuff.  The only problem I
ever had with the logging is that you have to have reporting turned on for
the nightly log processing to work.  But, you set it so you don't have any
reports to generate (just don't define any), and it works like a charm.  Or,
it did in my z/OS days.

For example:

AccessLogArchive - Remove existing access, agent, or referer log files or
run a user exit
Values specified on the AccessLogArchive directive apply to access, agent,
and referer logs. The collective size includes the size of all access logs
or all agent logs or all referer logs, not the collective size of all types
of logs.
At midnight each night, the server closes the current log and creates a new
log file for the coming day. You can choose to do one of the following
actions with the closed logs: 
v Remove log files of a given age or when a given amount of storage is used
by the collection of log files 
v Allow closed logs to remain on your file system 
v Branch to a user exit

Aaron


On Tue, 15 Jul 2008 09:35:06 -0500, Klein, Kevin [EMAIL PROTECTED] wrote:

Thanks everyone for your help.  We found some logs from z/Oses HTTP
server that were dumping into our root file system.  Problem resolved
(for now).

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Klein, Kevin
Sent: Monday, July 14, 2008 1:59 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Unix System Services File Space Used

We have a zFS file at 4GB so it can't expand.  It happens to be our root
file system and it's full so I'm not able to create any more directories
off the root.  We don't think we should have 4GB of data on this file.
Is there a way to see which directories and/or files are using this
space, short of doing an ls on every directory?


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Unix System Services File Space Used

2008-07-14 Thread Pommier, Rex R.
du -sk * from / should give you a list of the directories under /.
You can then drill down into the offenders to see where the space is
being taken.

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Klein, Kevin
Sent: Monday, July 14, 2008 1:59 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Unix System Services File Space Used

We have a zFS file at 4GB so it can't expand.  It happens to be our root
file system and it's full so I'm not able to create any more directories
off the root.  We don't think we should have 4GB of data on this file.
Is there a way to see which directories and/or files are using this
space, short of doing an ls on every directory?

Attention:
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material.  Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended
recipient is prohibited. If you received this in error, please contact
the sender and delete the material from any system and destroy any
copies.  (GWCC)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Unix System Services File Space Used

2008-07-14 Thread Robert Sample
I'd use du -k to find the problem directories and then zero in on them.

If you're running HTTP server, look at the log and error files directory. 
Also, /usr/spool can get big if not trimmed regularly.

Robert

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Unix System Services File Space Used

2008-07-14 Thread Mark Zelden
On Mon, 14 Jul 2008 13:59:08 -0500, Klein, Kevin [EMAIL PROTECTED] wrote:

We have a zFS file at 4GB so it can't expand.  It happens to be our root
file system and it's full so I'm not able to create any more directories
off the root.  We don't think we should have 4GB of data on this file.
Is there a way to see which directories and/or files are using this
space, short of doing an ls on every directory?


Find the largest dirs:
cd /
du -s * | sort -rn

Then change the dir to the one you want to look at:

cd /something
du -a | sort -rn  
   
 Or better since there may be a lot of output:

du -a | sort -rn  /u/userid/files.txt  


Mark
--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:[EMAIL PROTECTED]
z/OS Systems Programming expert at http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Unix System Services File Space Used

2008-07-14 Thread Lindy Mayfield
On a similar note, you can use the statfs syscall command to check the size and 
usage of your file systems.  You can easily create a Rexx exec to monitor 
things and alert you when the sizes are above a certain threshold.  Probably 
there are other ways, too...

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/BPXZB670/3.123

Something like this maybe as a starting point:

/*  Rexx */ 
If Syscalls('ON')  3   
  Then do   
Say 'Unable to establish SYSCALL environment.'  
Exit 99 
End 
Address SYSCALL 
fsname = 'SYSZFS.ROOT.TOR19A'   
statfs (fsname) st.   
Say Allocated space   st.STFS_INUSE   
Say Total space   st.STFS_TOTAL   
Say Total free blocks st.STFS_BFREE   
Say Percent used  st.STFS_INUSE / st.STFS_TOTAL * 100 


-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Mark 
Zelden
Sent: 14. heinäkuuta 2008 23:48
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: Unix System Services File Space Used

On Mon, 14 Jul 2008 13:59:08 -0500, Klein, Kevin [EMAIL PROTECTED] wrote:

We have a zFS file at 4GB so it can't expand.  It happens to be our root
file system and it's full so I'm not able to create any more directories
off the root.  We don't think we should have 4GB of data on this file.
Is there a way to see which directories and/or files are using this
space, short of doing an ls on every directory?


Find the largest dirs:
cd /
du -s * | sort -rn

Then change the dir to the one you want to look at:

cd /something
du -a | sort -rn  
   
 Or better since there may be a lot of output:

du -a | sort -rn  /u/userid/files.txt  


Mark
--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:[EMAIL PROTECTED]
z/OS Systems Programming expert at http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Unix System Services File Space Used

2008-07-14 Thread Mark Jacobs
You can define it as extended format so it can expand past 4GB limit.

Mark Jacobs 

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Klein, Kevin
Sent: Monday, July 14, 2008 2:59 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Unix System Services File Space Used

We have a zFS file at 4GB so it can't expand.  It happens to be our root
file system and it's full so I'm not able to create any more directories
off the root.  We don't think we should have 4GB of data on this file.
Is there a way to see which directories and/or files are using this
space, short of doing an ls on every directory?

Attention:
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material.  Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended
recipient is prohibited. If you received this in error, please contact
the sender and delete the material from any system and destroy any
copies.  (GWCC)



--
For IBM-MAIN subscribe / signoff / archive access instructions, send
email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search
the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html