Znn3bq.jpeg
²é¿´: 543  |  »Ø¸´: 6
µ±Ç°Ö÷ÌâÒѾ­´æµµ¡£
µ±Ç°Ö»ÏÔʾÂú×ãÖ¸¶¨Ìõ¼þµÄ»ØÌû£¬µã»÷ÕâÀï²é¿´±¾»°ÌâµÄËùÓлØÌû

TIGERYZZ

½ð³æ (СÓÐÃûÆø)

[½»Á÷] ¡¾ÇóÖú¡¿Çë½ÌtorqueÎÊÌâ

¸÷룬ÎÒÃǼ¯ÈºÊ¹ÓÃtorque¹ÜÀí£¬È»ºó¼ÆËã½á¹ûÒªÔÚ¼ÆËãÍê±ÏºóÊä³öe£¬oÎļþ¡£
ÏëÇëÎÊÄÜ·ñ²ÉÓÃqstat»òÕß±ðµÄÃüÁî£¬ËæÊ±²é¿´µ½ÕýÔÚÔËÐеÄÈÎÎñµÄÆÁÄ»Êä³ö£¬ÒԱ㼰ʱµ÷Õû£¬Ð»Ð»¡£
»Ø¸´´ËÂ¥

» ²ÂÄãϲ»¶

ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

123qweasd7962

¡ï ¡ï ¡ï ¡ï ¡ï ¡ï
wuli8(½ð±Ò+3,VIP+0):3KS 8-20 13:36
TIGERYZZ(½ð±Ò+3,VIP+0):Õâ¸öÊÇperlдµÄ£¿ºÃרҵ¡­¡­ºÃºÃ¿´¿´È¥£¬Ð»Ð»ÁË 8-20 21:00
¿ÉÒԲο¼Ê¹ÓÃqpeek

#!/usr/bin/perl

# qpeek:  Peek into a job's output spool files
# Copyright 2001, Ohio Supercomputer Center
#
# Usage:  qpeek [options] JOBID
#
# Options:
#   -c      Show all of the output file ("cat", default)
#   -h      Show only the beginning of the output file ("head"
#   -t      Show only the end of the output file ("tail"
#   -f      Show only the end of the file and keep listening ("tail -f"
#   -#      Show only # lines of output
#   -e      Show the stderr file of the job
#   -o      Show the stdout file of the job
#   -?      Display help

$tool="cat";
$numlines="";
$suffix="OU";
$spool="/var/spool/pbs/spool";
$host="oscbw";

while ( $ARGV[0] =~ /^-.*/ )
  {
    if ( $ARGV[0] eq "-c" )
      {
        $tool="cat";
      }
    elsif ( $ARGV[0] eq "-f" )
      {
        $tool="tail -f";
      }
    elsif ( $ARGV[0] eq "-h" )
      {
        $tool="head";
      }
    elsif ( $ARGV[0] eq "-t" )
      {
        $tool="tail";
      }
    elsif ( $ARGV[0] =~ /^-[0-9]+$/ )
      {
        $numlines=$ARGV[0];
      }
    elsif ( $ARGV[0] eq "-e" )
      {
        $suffix="ER"
      }
    elsif ( $ARGV[0] eq "-o" )
      {
        $suffix="OU"
      }
    elsif ( $ARGV[0] eq "-?" || $ARGV[0] eq "-help" )
      {
        print STDERR < qpeek:  Peek into a job's output spool files

Usage:  qpeek [options] JOBID

Options:
   -c      Show all of the output file ("cat", default)
   -h      Show only the beginning of the output file ("head"
   -t      Show only the end of the output file ("tail"
   -f      Show only the end of the file and keep listening ("tail -f"
   -#      Show only # lines of output
   -e      Show the stderr file of the job
   -o      Show the stdout file of the job (default)
   -?      Display this help message
EOF
        exit;
      }
    else
      {
        print STDERR "qpeek:  Unrecognized option $ARGV[0] ignored\n";
      }
    shift(@ARGV);
  }

$jobid=shift(@ARGV);
$jobid=~s/\.[A-z0-9.]+$//;
die "No jobid given!\n" if ( $jobid eq "" );

$node=&mothersuperior($jobid);
die "Job $jobid is not running!\n" if ( $node eq "" );

exec "rsh $node $tool $numlines $spool/$jobid.$host.$suffix\n";


sub mothersuperior
{
  local($jobid,$node);
  $jobid=$_[0];
  $node="";
  open(QSTAT,"qstat -f $jobid |";
  while ( )
    {
      chop;
      if ( $_ =~ /exec_host/ )
        {
          ($keyword,$node)=split(/=/);
          $node=~s:/[0-9]+[A-z0-9/+]*::;
        }
    }
  $node;
}

[ Last edited by 123qweasd7962 on 2009-8-20 at 11:47 ]
7Â¥2009-08-20 11:44:23
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
²é¿´È«²¿ 7 ¸ö»Ø´ð

fengya0785

Òø³æ (СÓÐÃûÆø)

¡ï ¡ï
TIGERYZZ(½ð±Ò+1,VIP+0):thanks~~ 7-20 21:53
mingdong(½ð±Ò+1,VIP+0):¸Ðл½»Á÷£¡ 8-2 08:34
torqueºÃÏñÊÇûÓÐÕ⹦ÄÜ£¬µ«Äã¿ÉÒÔÔÚÌá½»Ê±ÖØ¶¨ÏòÊä³öµ½ÎļþÀ¾Í¿ÉÒÔ¿´µ½ÆÁÄ»Êä³öÁË¡£
E
2Â¥2009-07-20 15:04:45
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

ma_chao

гæ (³õÈëÎÄ̳)

¡ï ¡ï
mingdong(½ð±Ò+1,VIP+0):¸Ðл½»Á÷£¡ 8-2 08:34
TIGERYZZ(½ð±Ò+1,VIP+0): 8-2 10:53
ÖØ¶¨Ïòµ½Îļþ£¬È»ºó¿ÉÒÔÓÃwatch + cat À´×Ô¶¯Öظ´¿´

¿ÉÒÔÓ㬵«²»È·¶¨¶Ô×ÊÔ´µÄËðºÄ

ºÇºÇ£¬fengya0785  
3Â¥2009-08-02 03:32:04
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

solocheng

ÈÙÓþ°æÖ÷ (ÎÄ̳¾«Ó¢)

ºÚ¶´¶´Ö÷

ÓÅÐã°æÖ÷

¹ýÀ´Ñ§Ï°ÁË£¬À÷º¦
ÄãÀ´ÁË£¬ÎÒÐÅÄã²»»á×ߣ»Äã×ßÁË£¬ÎÒµ±ÄãûÀ´¹ý¡£
4Â¥2009-08-02 12:01:10
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] Ò»Ö¾Ô¸985³õÊÔ354·ÖÉúÎïµ÷¼Á +3 031001 2026-04-06 3/150 2026-04-09 00:30 by Evan_Liu
[¿¼ÑÐ] 0703µ÷¼Á£¬Ò»Ö¾Ô¸Ìì½ò´óѧ319·Ö +23 haaaabcd 2026-04-05 26/1300 2026-04-08 16:19 by luoyongfeng
[¿¼ÑÐ] 085600²ÄÁÏÓ뻯¹¤301·ÖÇóµ÷¼ÁԺУ +27 ´ÌÍ´jk 2026-04-06 28/1400 2026-04-08 16:16 by luoyongfeng
[¿¼ÑÐ] ²ÄÁϵ÷¼Á +13 ºº123456 2026-04-07 14/700 2026-04-07 22:53 by À´¿´Á÷ÐÇÓê10
[¿¼ÑÐ] 22408 318·ÖÇóµ÷¼Á +4 ÇڷܵÄСÁý°ü 2026-04-06 6/300 2026-04-07 15:05 by Ö½º×555
[¿¼ÑÐ] ²ÄÁϵ÷¼Á +13 Ò»ÑùYWY 2026-04-05 14/700 2026-04-07 09:51 by piklet
[¿¼ÑÐ] 338Çóµ÷¼Á +4 ÎÒÏëÉϰ¶ii 2026-04-05 4/200 2026-04-06 21:04 by ľ×Ó¾ý1218
[¿¼ÑÐ] ¿¼Ñе÷¼Á +3 WwwwwwwÍÛ 2026-04-06 3/150 2026-04-06 20:55 by lbsjt
[¿¼ÑÐ] ¹¤¿Æ370Çóµ÷¼Á +3 äçÐļ弦µ° 2026-04-05 3/150 2026-04-06 10:55 by ÕâÊÇÒ»¸öÎÞÁĵÄê
[¿¼ÑÐ] 0857´óÀà»·¾³¹¤³ÌBÇøÇóµ÷¼Á +3 ¹¨ÓíÃú 2026-04-05 3/150 2026-04-06 10:22 by À¶ÔÆË¼Óê
[¿¼ÑÐ] 272·ÖÇóµ÷¼Á +4 wangyile2233 2026-04-02 4/200 2026-04-05 22:21 by 286640313
[¿¼ÑÐ] ²ÄÁϵ÷¼Á +13 Ò»ÑùYWY 2026-04-03 14/700 2026-04-05 18:20 by À¶ÔÆË¼Óê
[¿¼ÑÐ] 313Çóµ÷¼Á +5 º£ÈÕº£ÈÕ 2026-04-04 7/350 2026-04-05 13:58 by imissbao
[¿¼ÑÐ] 328·Öµ÷¼Á +6 ÃÅmen 2026-04-04 6/300 2026-04-05 13:40 by imissbao
[¿¼ÑÐ] 271·ÖÇóµ÷¼ÁѧУ +12 zph158488£¡ 2026-04-02 13/650 2026-04-05 10:13 by lqwchd
[¿¼ÑÐ] ²ÄÁÏ¿ÆÑ§Ó빤³Ì¿¼ÑÐ +10 Õü¾ÈÆ¤ÌØÍÐÏÈÉú 2026-04-02 10/500 2026-04-03 23:57 by userper
[¿¼ÑÐ] ¿¼Ñе÷¼Á +3 Draa 2026-04-03 3/150 2026-04-03 17:37 by hgwz7468
[¿¼ÑÐ] »¯Ñ§070300-×Ü·Ö378-Çóµ÷¼Á +5 ŲÒÎ×ÓµÄÅÝÅÝÌÇ 2026-04-02 5/250 2026-04-02 22:20 by ZXlzxl0425
[¿¼ÑÐ] Ò»Ö¾Ô¸Î人Àí¹¤0856£¬³õÊÔ334 +3 26¿¼ÑвÄÁÏ 2026-04-02 3/150 2026-04-02 21:22 by dongzh2009
[¿¼ÑÐ] 279Çóµ÷¼Á +5 ¸µÎÄÇï 2026-04-02 5/250 2026-04-02 18:10 by ±ÊÂä½õÖÝ
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û