[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [TEKNIK] Pipe til grep skærer strengen efte r 56 tegn



Nicky Larstrup wrote:
Jeg ved ikke helt om dette her hører til her eller i Novice, så bær over med
mig hvis jeg har gættet forkert.

Min udfordring er at jeg sidder med en ESX server, hvor vi en sjælden gang i
mellem har behov for at komme ind og slå en maskine ned manuelt. Typisk
finder vi dens PID ved at køre 'ps x' og scrolle rundt til vi finder den
rigtige server - Det er jo tosset ikke lige at bruge grep til at gøre det
lidt lettere for sig selv, men problemet er her at "linierne" der bliver
pipet til grep, bliver skåret af efter 56 tegn - Hvorfor det? Og er det
noget man kan komme uden om?

Og et par dumps for at gøre det hele meget mere forståeligt:


sslug@sslug root]# ps x
  PID TTY      STAT   TIME COMMAND
    1 ?        S      0:07 init [3]
    2 ?        SW     0:00 [keventd]
    3 ?        SWN    2:56 [ksoftirqd_CPU0]
    4 ?        SW     0:12 [kswapd]
 .......
20455 ?        S<     0:05 /usr/lib/vmware/bin/vmware-vmx -C
/home/vmware/PSPORTAL Microsoft Windows Serve
20456 ?        S<     0:02 vmware-mks -A 11 -D 13 -S -L
/tmp/vmware-root-20455.log -P 20455 -g -@ vm=3309b
20461 ?        S<     0:00 vmware [Floppy]
20462 ?        S<     0:00 vmware [ide0:0]
20463 ?        S      0:00 /usr/lib/vmware/bin/vmware-vmx -C
/home/vmware/PSPORTAL Microsoft Windows Serve
20464 ?        S      4:23 /usr/lib/vmware/bin/vmware-vmx -C
/home/vmware/PSPORTAL Microsoft Windows Serve
24172 ?        S      0:00 sshd: sslug@sslug/0
24174 pts/0    S      0:00 -bash



sslug@sslug root]#  ps x | grep "PSPORTAL"
16654 pts/1    S      0:00 grep PSPORTAL
sslug@sslug root]#


sslug@sslug root]#  ps x | grep "PS"
20455 ?        S<     0:05 /usr/lib/vmware/bin/vmware-vmx -C
/home/vmware/PSPORT
20463 ?        S      0:00 /usr/lib/vmware/bin/vmware-vmx -C
/home/vmware/PSPORT
20464 ?        R      4:24 /usr/lib/vmware/bin/vmware-vmx -C
/home/vmware/PSPORT
16780 pts/1    S      0:00 grep PS
sslug@sslug root]#



Håber der er findes en der er klogere end mig - eller om ikke andet har
bedre styr på google :)

/Nicky

prøve om det ikke er denne ps variant du leder efter:

ps -auxww

/Frank


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2009-10-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *