hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Isaacson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9253) Capture ulimit info in the logs at service start time
Date Tue, 29 Jan 2013 01:42:11 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-9253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13564968#comment-13564968
] 

Andy Isaacson commented on HADOOP-9253:
---------------------------------------

bq. I am not quite sure i understand what you are referring to. The log file that is being
printed to the console should never have any left over contents as start commands overwrites
it.

Your patch has:
{noformat}
+++ hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh
@@ -154,7 +154,11 @@ case $startStop in
       ;;
     esac
     echo $! > $pid
-    sleep 1; head "$log"
+    sleep 1
+    # capture the ulimit output
+    echo "ulimit -a" >> $log
+    ulimit -a >> $log 2>&1
+    head "$log"
{noformat}

The file {{$log}} might be empty, or it might have some content from the 'nohup' command line
a few lines up.  Regardless, your patch then adds two commands (echo, then ulimit) that {{>>}}
append to {{$log}}. Together those will append 17 lines of output to {{$log}}.

Then you use {{head}} to print out the first 10 lines of {{$log}}.  These 10 lines might include
some errors or warning messages from nohup, and then a few lines of the 17 that were printed
by ulimit.

So I have two feedback items: 1. it's unclear why to write {{ulimit}} to {{$log}} at all.
Why not just write ulimit output directly to console? 2. If writing ulimit to $log, why use
{{head}} to truncate the output?  At least change the {{head}} command to print the entire
expected output, {{head -20}} or similar.
                
> Capture ulimit info in the logs at service start time
> -----------------------------------------------------
>
>                 Key: HADOOP-9253
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9253
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 1.1.1, 2.0.2-alpha
>            Reporter: Arpit Gupta
>            Assignee: Arpit Gupta
>         Attachments: HADOOP-9253.branch-1.patch, HADOOP-9253.branch-1.patch, HADOOP-9253.patch
>
>
> output of ulimit -a is helpful while debugging issues on the system.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message