Skip to content

Instantly share code, notes, and snippets.

@l1x
Last active December 31, 2015 00:09
Show Gist options
  • Select an option

  • Save l1x/7905518 to your computer and use it in GitHub Desktop.

Select an option

Save l1x/7905518 to your computer and use it in GitHub Desktop.
#why dont you go and do something else instead of writing software? thank you!!
while read -r job_id status start_time user job_name priority _ _ used_mem _ need_mem _ ; do
echo "$job_id $status $user $used_mem $(date -d@$(( $start_time / 1000 )))" ;
done < <(mapred job -list all 2>/dev/null | egrep RUNN) | sort -k 4 -n
#JobId State StartTime UserName Queue Priority UsedContainers RsvdContainers UsedMem RsvdMem NeededMem AM info
@l1x
Copy link
Author

l1x commented Dec 11, 2013

or not

while true ; do 

  while read -r job_id status start_time user job_name priority _ _ used_mem _ need_mem _ ; do
    echo "$job_id $status $user $used_mem $(date -d@$(( $start_time / 1000 )))" ;   
  done < <(mapred job -list all 2>/dev/null | egrep RUNN) | sort -k 4 -n ; 

sleep 10 ; 
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment