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 I have so far:
Code:
#!/bin/sh
# This script displays a user friendly message that lists the top 10 users of
# storage on the system in human readable form.
awk -F ":" '{ print $1}' /etc/passwd > usersAndStorage
#add storage usage part here and append to file using tabs
while read line
do
user=$(echo "$line" | cut -f1)
#add usage here so it will show in terminal
echo $user
echo
done <$1
Thanks a lot to anyone who can help.
Last edited by Franklin52; 09-06-2012 at 04:19 AM..
Reason: Please use code tags for data and code samples
hi,
i'm new to this company and i'm using old AIX 4.3 with DAS and SSA storage. What is the best way to query a report for disk capacity, usage, free, etc.
I know in AIX 5 there's a command for "du -g /" or "du -m /" to report the total usage but I'm not using AIX5. In AIX 4.3 I can use "df... (5 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)
I want to see top 5 users,who have occupied most amount of disk space in a filesystem.
But not sure how to do it.
I can get the usage for a particular user
find . -user user -type f exec df -h {} \;|awk '{ s = s+$1 } END { print "Total used: ",s }'
But how to get without specifying any user... (6 Replies)
Hi every one, im kind new in scripting.
i need to write a script that will collect my storage usage (df -k) like every hour and save the max amout and min amout into csv file so over time lest say one month we have the min/max values. Is it possible with awk command ?
Any ideas are welcome.:) (4 Replies)
Discussion started by: venus699
4 Replies
LEARN ABOUT SUSE
xkbgetkeyactions
XkbGetKeyActions(3) XKB FUNCTIONS XkbGetKeyActions(3)NAME
XkbGetKeyActions - Update the actions (the key_acts array) for a subset of the keys in a keyboard description
SYNOPSIS
Status XkbGetKeyActions (Display *dpy, unsigned int first, unsigned int num, XkbDescPtr xkb);
ARGUMENTS
- dpy connection to X server
- first
keycode of first key of interest
- num number of keys desired
- xkb pointer to keyboard description where result is stored
DESCRIPTION
XkbGetKeyActions sends a request to the server to obtain the actions for num keys on the keyboard starting with key first. It waits for a
reply and returns the actions in the server->key_acts field of xkb. If successful, XkbGetKeyActions returns Success. The xkb parameter
must be a pointer to a valid Xkb keyboard description.
If the server map, in the xkb parameter, has not been allocated, XkbGetKeyActions allocates and initializes it before obtaining the
actions.
If the server does not have a compatible version of Xkb, or the Xkb extension has not been properly initialized, XkbGetKeyActions returns
BadAccess. If num is less than 1 or greater than XkbMaxKeyCount, XkbGetKeyActions returns BadValue. If any allocation errors occur,
XkbGetKeyActions returns BadAlloc.
DIAGNOSTICS
BadAccess The Xkb extension has not been properly initialized
BadAlloc Unable to allocate storage
BadValue An argument is out of range
X Version 11 libX11 1.3.2 XkbGetKeyActions(3)