Sponsored Content
Top Forums UNIX for Advanced & Expert Users any quicker way to list disc usage by users? Post 302481161 by phil518 on Thursday 16th of December 2010 11:02:34 PM
Old 12-17-2010
Quote:
Originally Posted by jim mcnamara
Code:
find /path/to/home  -exec ls -ls {} \ ; |
awk '{arr[$3]+=$1; next; }
       END {for (i in arr) {print i, arr[i]}  }'

Thank you very much. I tried it but found the improvement is not very substantial.

when I time the du command, I found the (utime + stime)/real time is only 3%.

is there a way to make this ratio substantically higher?

Thanks.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

memory usage : kernel, oracle, other users

Hello, I'm looking for a command or script that could permit me to know what is memory usage group by HP-UX kernel, oracle processes and other users (specific software). A command like 'top' but for all processes and not only for 12 max could be very useful Thanks in advance (4 Replies)
Discussion started by: thierryUX
4 Replies

2. Solaris

Ultra 10 - Copying Files From Disc After Booting Up With Recovery Disc?

Hello, I'm still learning unix and I have what is probably a simple question but I can't seem to find the question to. I have an Ultra 10 Sparc Server running solaris 8 and the drive may have crashed (I hope not). Currently, it appears some files in the /etc folder are missing. I have a backup... (1 Reply)
Discussion started by: ideffects
1 Replies

3. UNIX and Linux Applications

grant usage to users listed in a file

hi, i'm trying to grant usage to multiple users whose ids are in a file. i thought that i could put the mysql code within a while loop, but that's not working for me: while read user; do userid=$user passwd="changeme" query="grant usage on mysql.USERS.* to $userid... (2 Replies)
Discussion started by: ankimo
2 Replies

4. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

5. AIX

balance CPU usage between users

Hi! Is there any way to balance CPU usage between users on percentage basis? Something like Resource Manager in Oracle databases. Regards. ---------- Post updated at 02:17 PM ---------- Previous update was at 02:09 PM ---------- Workload Manager? ---------- Post updated at 03:44 PM... (0 Replies)
Discussion started by: bas_ua
0 Replies

6. UNIX for Dummies Questions & Answers

CPU usage restrictions for users?

I was wondering if there was a way to set resource usage per user. For example, if I use "grep -f <file1> <file2>" and the two files are very big it consumes a lot of resources. Onetime someone pinged me and asked what the hell I was doing and to kill it. Is there any way an SA can restrict... (7 Replies)
Discussion started by: MaindotC
7 Replies

7. Shell Programming and Scripting

Users and their storage usage

Hey, I'm trying to make a script that can list users and their storage usage in a file. Im trying to get it to where the format is: User xxkbs User2 xkb and so on. So far I figured out how to get the users, but I cannot figure out how to get the storage usage per user. This is what... (2 Replies)
Discussion started by: HakerDemon
2 Replies

8. UNIX for Advanced & Expert Users

Help in faster and quicker grepping

Hi, i have a log file of 8 GB size , i need to grep the count of a word which i give as an input , i mean to say to find the occurance of a word on that file. grep is taking too much time ,can you please give me any command so that i can grep the word in a quicker way.. thanks, ... (16 Replies)
Discussion started by: senkerth
16 Replies

9. Shell Programming and Scripting

Usage of disc group to kick off Oracle RMAN backup

Hi guys, i need a small help. I was writing an automation script for import utility of oracle datapump. I am getting stuck in one part of the shell script where i am doing a grep on one of the filesystem and if it is above threshold then it would kick off an oracle RMAN backup. Fyi. i am grepping... (3 Replies)
Discussion started by: sub
3 Replies

10. Emergency UNIX and Linux Support

Usage by users

I would like to know how to capture the usage of CPU by each user. Is there a way to do this on AIX? Gaya (0 Replies)
Discussion started by: ggayathri
0 Replies
QUOTA(2)							System Calls Manual							  QUOTA(2)

NAME
quota - manipulate disk quotas SYNOPSIS
#include <sys/quota.h> quota(cmd, uid, arg, addr) int cmd, uid, arg; char *addr; DESCRIPTION
The quota call manipulates disk quotas for file systems that have had quotas enabled with setquota(2). The cmd parameter indicates a com- mand to be applied to the user ID uid. Arg is a command specific argument and addr is the address of an optional, command specific, data structure that is copied in or out of the system. The interpretation of arg and addr is given with each command below. Q_SETDLIM Set disc quota limits and current usage for the user with ID uid. Arg is a major-minor device indicating a particular file system. Addr is a pointer to a struct dqblk structure (defined in <sys/quota.h>). This call is restricted to the super-user. Q_GETDLIM Get disc quota limits and current usage for the user with ID uid. The remaining parameters are as for Q_SETDLIM. Q_SETDUSE Set disc usage limits for the user with ID uid. Arg is a major-minor device indicating a particular file system. Addr is a pointer to a struct dqusage structure (defined in <sys/quota.h>). This call is restricted to the super-user. Q_SYNC Update the on-disc copy of quota usages. Arg is a major-minor device indicating the file system to be sync'ed. If the arg parame- ter is specified as NODEV, all file systems that have disc quotas will be sync'ed. The uid and addr parameters are ignored. Q_SETUID Change the calling process's quota limits to those of the user with ID uid. The arg and addr parameters are ignored. This call is restricted to the super-user. Q_SETWARN Alter the disc usage warning limits for the user with ID uid. Arg is a major-minor device indicating a particular file system. Addr is a pointer to a struct dqwarn structure (defined in <sys/quota.h>). This call is restricted to the super-user. Q_DOWARN Warn the user with user ID uid about excessive disc usage. This call causes the system to check its current disc usage information and print a message on the terminal of the caller for each file system on which the user is over quota. If the user is under quota, his warning count is reset to MAX_*_WARN (defined in <sys/quota.h>). If the arg parameter is specified as NODEV, all file systems that have disc quotas will be checked. Otherwise, arg indicates a specific major-minor device to be checked. This call is restricted to the super-user. RETURN VALUE
A successful call returns 0, otherwise the value -1 is returned and the global variable errno indicates the reason for the failure. ERRORS
A quota call will fail when one of the following occurs: [EINVAL] The kernel has not been compiled with the QUOTA option. [EINVAL] Cmd is invalid. [ESRCH] No disc quota is found for the indicated user. [EPERM] The call is priviledged and the caller was not the super-user. [ENODEV] The arg parameter is being interpreted as a major-minor device and it indicates an unmounted file system. [EFAULT] An invalid addr is supplied; the associated structure could not be copied in or out of the kernel. [EUSERS] The quota table is full. SEE ALSO
setquota(2), quotaon(8), quotacheck(8) BUGS
There should be some way to integrate this call with the resource limit interface provided by setrlimit(2) and getrlimit(2). The Australian spelling of disk is used throughout the quota facilities in honor of the implementors. 4.2 Berkeley Distribution May 15, 1986 QUOTA(2)
All times are GMT -4. The time now is 03:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy