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)
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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT BSD
quota
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)