Return-Path: X-Original-To: apmail-hadoop-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9261F10CE4 for ; Thu, 29 Aug 2013 06:58:17 +0000 (UTC) Received: (qmail 37096 invoked by uid 500); 29 Aug 2013 06:58:12 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 37005 invoked by uid 500); 29 Aug 2013 06:58:11 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 36998 invoked by uid 99); 29 Aug 2013 06:58:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Aug 2013 06:58:11 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of suneel.bigdata@gmail.com designates 209.85.212.174 as permitted sender) Received: from [209.85.212.174] (HELO mail-wi0-f174.google.com) (209.85.212.174) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Aug 2013 06:58:05 +0000 Received: by mail-wi0-f174.google.com with SMTP id en1so81412wid.7 for ; Wed, 28 Aug 2013 23:57:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=t/KGFNtbCYgqTHrXqvjjhUlJG6XwQpBLj2YtJ2GtJLU=; b=tmVTuIQmoN55JPz1fqldh023aHzCv6jvdEGVi1FYHd4LBNWiz61wQQ3bVnyCKU3fux AF5cCsCnvMDTnbtxPl5of+WiK251nRe8RTbX8UaqdqVlGMG56h/uFSYyI6JZ8MDbJBWg rBPe1L4/FkRJTPJHk+AzK3iBEQd5f0EUU/bdOF1z+RK0CTZk3+nnmfpcK6CWaw6drVBR G3age5kiIBjEEfw3eIsuOMXdz872tckZZ3/YaXPh+r9k1MQ1a94wlniDGz0ihqZED6uB wM5C0oQtL/jOjAvZaDPpCfatjNazUY5rEEuxDKQ5m3IjzTpL6bCrABOSyQjVJOfNWOwH nuTw== MIME-Version: 1.0 X-Received: by 10.194.93.105 with SMTP id ct9mr3407721wjb.6.1377759465175; Wed, 28 Aug 2013 23:57:45 -0700 (PDT) Received: by 10.194.103.39 with HTTP; Wed, 28 Aug 2013 23:57:45 -0700 (PDT) Date: Thu, 29 Aug 2013 12:27:45 +0530 Message-ID: Subject: how to find process under node From: suneel hadoop To: user Content-Type: multipart/alternative; boundary=047d7bb03e7882001904e5109f5a X-Virus-Checked: Checked by ClamAV on apache.org --047d7bb03e7882001904e5109f5a Content-Type: text/plain; charset=ISO-8859-1 Hi All, what im trying out here is to capture the process which is running under which node this is the unix script which i tried !/bin/ksh Cnt=cat /users/hadoop/unixtest/nodefilename.txt | wc -l cd /users/hadoop/unixtest/ ls -ltr | awk '{print $9}' > list_of_scripts.txt split -l $Cnt list_of_scripts.txt node_scripts ls -ltr node_scripts* | awk '{print $9}' > list_of_node_scripts.txt for i in nodefilename.txt do for j in list_of_node_scripts.txt do node=$i script_file=$j cat $node\n $script_file >> $script_file done done exit 0; but my result should look like below: node1 node2 ----- ------- process1 proces3 process2 proces4 can some one please help in this.. thanks in advance.. --047d7bb03e7882001904e5109f5a Content-Type: text/html; charset=ISO-8859-1

Hi All,

what im trying out here is to capture the process which is running under which node

this is the unix script which i tried


!/bin/ksh


Cnt=cat /users/hadoop/unixtest/nodefilename.txt | wc -l
cd /users/hadoop/unixtest/
ls -ltr | awk '{print $9}' > list_of_scripts.txt
split -l $Cnt list_of_scripts.txt node_scripts
ls -ltr node_scripts* | awk '{print $9}' > list_of_node_scripts.txt
for i in nodefilename.txt
do
for j in list_of_node_scripts.txt
do
node=$i
script_file=$j
cat $node\n $script_file >> $script_file
done
done


exit 0;



but my result should look like below:


node1 node2
----- -------
process1 proces3
process2 proces4


can some one please help in this..
thanks in advance..

--047d7bb03e7882001904e5109f5a--