| Author |
Message |
![]() ![]() ![]() ![]()
Kranth1
Side Hero Username: Kranth1
Post Number: 4703 Registered: 03-2016 Posted From: 209.136.235.13
Rating: N/A Votes: 0 (Vote!) | | Posted on Tuesday, August 15, 2017 - 04:21 pm: |
![]() ![]() ![]() ![]() ![]() |
Hadoop:
Thanks unkul. I appreciate it. Ardham cheskodaniki try chestanu. "Every twist, every turn, can challenge our sense of direction. But it's the choices we make when we reach a fork in the road that define who we are." - Dexter |
![]() ![]() ![]() ![]()
Hadoop
Side Hero Username: Hadoop
Post Number: 8467 Registered: 12-2014 Posted From: 99.104.124.142
Rating: N/A Votes: 0 (Vote!) | | Posted on Tuesday, August 15, 2017 - 03:21 pm: |
![]() ![]() ![]() ![]() ![]() |
Kranth1:so deeni valla the commands you have given wont work. I think shell scripting lo, aa filesystem lo loop cheyyali, to get all the files owned by the user.
uncle nee list of files owned by user kavala? step 1 : find /home -user $USER -exec stat {} replace user and home directory will list all files owned by that user step 2: above command spool it like find /users -user macadmin -exec stat {} \; > /User/macadmin/temp.txt step 3: then on that temp file use awk to get size of the each file like cat /Users/rsam0002/temp.txt|awk '{print $1} step 4: above will give you list of all files with just size step 5 : then use just need to sum it up to get that all file sizes....for example your output file is temp.txt export listsize=/../../temp.txt for filesize in $listsize do (total+=filsize) done ; print $total above is pseudo code....you can script it.... if above not give you some light...may be i misunderstood u r requirement... |
![]() ![]() ![]() ![]()
Kranth1
Side Hero Username: Kranth1
Post Number: 4701 Registered: 03-2016 Posted From: 209.136.235.13
Rating: N/A Votes: 0 (Vote!) | | Posted on Tuesday, August 15, 2017 - 02:48 pm: |
![]() ![]() ![]() ![]() ![]() |
Hadoop:
Nenu oka app admin. But nenu work chesedhi oka chinna hospital. nene manage cheyyali. I dont have linux admin exp. maa application nunchi files write chestaru. I cannot impose user quota, as some are very active users and some are passive users. Ikkada problem entante, oka directory lo ne store cheyyaru. I mean oka directory lo files untayi, child directories kuda untayi /storage/group/file.txt /storage/group/project/file.text so deeni valla the commands you have given wont work. I think shell scripting lo, aa filesystem lo loop cheyyali, to get all the files owned by the user. "Every twist, every turn, can challenge our sense of direction. But it's the choices we make when we reach a fork in the road that define who we are." - Dexter |
![]() ![]() ![]() ![]()
Hadoop
Side Hero Username: Hadoop
Post Number: 8465 Registered: 12-2014 Posted From: 99.104.124.142
Rating: N/A Votes: 0 (Vote!) | | Posted on Tuesday, August 15, 2017 - 02:35 pm: |
![]() ![]() ![]() ![]() ![]() |
try this..try this in non prod first....replace with your user.....if you want to loop it for all user....just put all users in file or get user list from /etc/passwd and do while read loop for that file and pass it to below command. it may take a while to compete find . -user {your user name} -type f -exec du -k {} \;|awk '{ s = s+$1 } END { print "Total used: ",s }' also uncle...y not use user quotas in file system that gives u more flexibility get all these stats if it is hadoop data nodes? |
![]() ![]() ![]() ![]()
Linkmaster
Legend Username: Linkmaster
Post Number: 55647 Registered: 02-2008 Posted From: 149.128.8.245
Rating: N/A Votes: 0 (Vote!) | | Posted on Tuesday, August 15, 2017 - 02:24 pm: |
![]() ![]() ![]() ![]() ![]() |
Hadoop:Kranth1:
ok then sort with du -shc * |sort -n |
![]() ![]() ![]() ![]()
Hadoop
Side Hero Username: Hadoop
Post Number: 8464 Registered: 12-2014 Posted From: 99.104.124.142
Rating: N/A Votes: 0 (Vote!) | | Posted on Tuesday, August 15, 2017 - 02:17 pm: |
![]() ![]() ![]() ![]() ![]() |
Kranth1:Hadoop bro, Maa system lo, we are using Kerberos authentication to authenticate AD users on a linux box. oka filesystem, say /storage lo we have asked users to store their files, which are owned by the user (read it as domain\username). Ippudu data usage chudali ee filesystem lo based on userid. data storage by directory ki I have a command sudo -s du --max-depth=1 --block-size=1G /filesystem | sort -n -r But ee requirement is different
try this..i just tested on my mac...output is below.... du -shc /users/* 4.9G /users/Shared 12K /users/macadmin 96G /users/rss02 108M /users/username_usage 101G total
Kranth1:Hadoop bro, Maa system lo, we are using Kerberos authentication to authenticate AD users on a linux box. oka filesystem, say /storage lo we have asked users to store their files, which are owned by the user (read it as domain\username). Ippudu data usage chudali ee filesystem lo based on userid. data storage by directory ki I have a command sudo -s du --max-depth=1 --block-size=1G /filesystem | sort -n -r But ee requirement is different
so question is.....are those owners only write to its own home directory ? simple command like below will get job done..i tested in my mac......but if that user is writing to any other file system(volume)? if you know the location where that user writing below command will help...but if you dont know where those files are writing you have to go through all avialable file system on host including home mount...for which whole lot of open source scripts are there...let me find du -shc /users/* 4.9G /users/Shared 12K /users/macadmin 96G /users/rss02 108M /users/username_usage 101G total |
![]() ![]() ![]() ![]()
Stalker
Side Hero Username: Stalker
Post Number: 2199 Registered: 08-2012 Posted From: 208.78.142.232
Rating: N/A Votes: 0 (Vote!) | | Posted on Tuesday, August 15, 2017 - 01:58 pm: |
![]() ![]() ![]() ![]() ![]() |
oke kochen different na bye |
![]() ![]() ![]() ![]()
Stalker
Side Hero Username: Stalker
Post Number: 2198 Registered: 08-2012 Posted From: 208.78.142.232
Rating: N/A Votes: 0 (Vote!) | | Posted on Tuesday, August 15, 2017 - 01:57 pm: |
![]() ![]() ![]() ![]() ![]() |
w -hi | awk '{ print $1 }' -h Suppress the heading. -i Output is sorted by idle time. |
![]() ![]() ![]() ![]()
Kranth1
Side Hero Username: Kranth1
Post Number: 4700 Registered: 03-2016 Posted From: 209.136.235.13
Rating: N/A Votes: 0 (Vote!) | | Posted on Tuesday, August 15, 2017 - 01:54 pm: |
![]() ![]() ![]() ![]() ![]() |
Hadoop bro, Maa system lo, we are using Kerberos authentication to authenticate AD users on a linux box. oka filesystem, say /storage lo we have asked users to store their files, which are owned by the user (read it as domain\username). Ippudu data usage chudali ee filesystem lo based on userid. data storage by directory ki I have a command sudo -s du --max-depth=1 --block-size=1G /filesystem | sort -n -r But ee requirement is different "Every twist, every turn, can challenge our sense of direction. But it's the choices we make when we reach a fork in the road that define who we are." - Dexter |
![]() ![]() ![]() ![]()
Hadoop
Side Hero Username: Hadoop
Post Number: 8462 Registered: 12-2014 Posted From: 99.104.124.142
Rating: N/A Votes: 0 (Vote!) | | Posted on Tuesday, August 15, 2017 - 01:50 pm: |
![]() ![]() ![]() ![]() ![]() |
Hadoop: by going there simply u can do df -h ? i
usually u should assign perm to that directories which user to write there....so if u know that...go there ...try du -sk * it give all sizes and do periodic checks to find the size/growth.... if you want to find at n/w level...its bit complicated but below would be handy iftop -p/ or iptraf are handy to get the bandwith based on port....but again you need to write some small script to find out which port is using for which process and who is owner of that process.... |
![]() ![]() ![]() ![]()
Hadoop
Side Hero Username: Hadoop
Post Number: 8461 Registered: 12-2014 Posted From: 99.104.124.142
Rating: N/A Votes: 0 (Vote!) | | Posted on Tuesday, August 15, 2017 - 01:47 pm: |
![]() ![]() ![]() ![]() ![]() |
Linkmaster:Kranth1: du -sh * |sort -n will give you bigger files/directories
uncle anta simple di adugutaada? |
![]() ![]() ![]() ![]()
Hadoop
Side Hero Username: Hadoop
Post Number: 8460 Registered: 12-2014 Posted From: 99.104.124.142
Rating: N/A Votes: 0 (Vote!) | | Posted on Tuesday, August 15, 2017 - 01:46 pm: |
![]() ![]() ![]() ![]() ![]() |
Kranth1:Oka filesystem for files storage use chesthunnam. Akkadaye user ekkuva data store chesadu anedhi kavali
..oo my ntr....if i understood u r question right ...user ante u talking about end user ? or that process owner ? end user you cannot get it from unix...u should get it from admin consoles of that appp.....if i assume your user and process running in that box is same.....you should have directory's assigned for that user right? by going there simply u can do df -h ? i assume you not asking this simple one.....if you want to check periodically ..you can schedule simple script. |
![]() ![]() ![]() ![]()
Linkmaster
Legend Username: Linkmaster
Post Number: 55644 Registered: 02-2008 Posted From: 149.128.8.245
Rating: N/A Votes: 0 (Vote!) | | Posted on Tuesday, August 15, 2017 - 01:45 pm: |
![]() ![]() ![]() ![]() ![]() |
Kranth1:
du -sh * |sort -n will give you bigger files/directories |
![]() ![]() ![]() ![]()
Kranth1
Side Hero Username: Kranth1
Post Number: 4699 Registered: 03-2016 Posted From: 209.136.235.13
Rating: N/A Votes: 0 (Vote!) | | Posted on Tuesday, August 15, 2017 - 01:39 pm: |
![]() ![]() ![]() ![]() ![]() |
Hadoop:more data? you mean I/O?
Oka filesystem for files storage use chesthunnam. Akkadaye user ekkuva data store chesadu anedhi kavali "Every twist, every turn, can challenge our sense of direction. But it's the choices we make when we reach a fork in the road that define who we are." - Dexter |
![]() ![]() ![]() ![]()
Hadoop
Side Hero Username: Hadoop
Post Number: 8459 Registered: 12-2014 Posted From: 99.104.124.142
Rating: N/A Votes: 0 (Vote!) | | Posted on Tuesday, August 15, 2017 - 01:33 pm: |
![]() ![]() ![]() ![]() ![]() |
Kranth1:Oka report generate cheyyali. Oka filesystem lo top users who are using more data ani oka report cheyyali. Any pointers are appreciated. Oka 5* vestanu
more data? you mean I/O? |
![]() ![]() ![]() ![]()
Kranth1
Side Hero Username: Kranth1
Post Number: 4698 Registered: 03-2016 Posted From: 209.136.235.13
Rating: N/A Votes: 0 (Vote!) | | Posted on Tuesday, August 15, 2017 - 01:30 pm: |
![]() ![]() ![]() ![]() ![]() |
Evaranna Linux expert unte oka QQ Oka report generate cheyyali. Oka filesystem lo top users who are using more data ani oka report cheyyali. Any pointers are appreciated. Oka 5* vestanu  "Every twist, every turn, can challenge our sense of direction. But it's the choices we make when we reach a fork in the road that define who we are." - Dexter |