Linux2016. 11. 16. 18:22

갑자기 hadoop유저로 전환이 안됨


root@HOSTNAME /root]$ su -l hadoop

su: cannot set user id: Resource temporarily unavailable



구글링 해본 결과 아래 화일에 hadoop유저의 설정을 추가 해줘야하는 것 같다

이 화일에 별도의 설정이 없으면 디폴트값이 1024 인듯


root@HOSTNAME/root]$ less /etc/security/limits.conf


irteam       soft    nofile             81920

irteam       hard    nofile             81920

irteamsu     soft    nofile             81920

irteamsu     hard    nofile             81920

www          soft    nofile             81920

www          hard    nofile             81920

root         soft    nofile             81920

root         hard    nofile             81920


irteam       soft    nproc              81920

irteam       hard    nproc              81920

irteamsu     soft    nproc              81920

irteamsu     hard    nproc              81920

www          soft    nproc              81920

www          hard    nproc              81920

root         soft    nproc              81920

root         hard    nproc              81920


hadoop유저의 프로세스수를 확인해보니 딱 1024 역시 이게 수상스럽다.


root@HOSTNAME/root]$ ps -u hadoop -L | wc -l

1024


/etc/security/limits.conf 에 hadoop 유저 설정을 추가


hadoop          soft    nproc           81920

hadoop          hard    nproc           81920



hadoop유저로 전환 성공


root@HOSTNAME/root]$ su -l hadoop

hadoop@HOSTNAME/home/hadoop]$ 



왜 hadoop유저의 프로세스수가 증가했는지는 별도 조사가 필요



'Linux' 카테고리의 다른 글

편리한 명령어 모음  (0) 2016.11.16
Ghost 패치후 서버 이상  (0) 2015.02.06
Posted by 유나아빠
Linux2016. 11. 16. 12:23

프로세스별 메모리 사용량 톱 10

ps alx  | awk '{printf ("%d\t%s\n", $8,$13)}' | sort -nr | head -10

'Linux' 카테고리의 다른 글

su: cannot set user id: Resource temporarily unavailable 에러  (1) 2016.11.16
Ghost 패치후 서버 이상  (0) 2015.02.06
Posted by 유나아빠
Hive2016. 1. 20. 18:36

날짜계산의 예

set e_dt=from_unixtime(unix_timestamp(),'YYYY-MM-DD');

set yyyy = case when month(${hiveconf:e_dt}) < 4 then year(${hiveconf:e_dt})-1 else year(${hiveconf:e_dt}) end;

set m = case when month(${hiveconf:e_dt}) =1 then 10 

                         when month(${hiveconf:e_dt}) =2 then 11

                         when month(${hiveconf:e_dt}) =3 then 12

                         else month(${hiveconf:e_dt})-3 end;

set mm = case when ${hiveconf:m}<10 then concat('0',${hiveconf:m}) else ${hiveconf:m} end;

set s_dt= concat(${hiveconf:yyyy},'-',${hiveconf:mm},'-01');

Posted by 유나아빠