|
|
|
![]() |
|
Strumenti |
![]() |
#19181 |
Senior Member
Iscritto dal: May 2004
Messaggi: 7806
|
scusate una domanda: ma i nuovi chip delle mobo sono sempre piu complessi con features come OC in auto etc; considerando i chip nforce noi del pinguino cosa abbiamo?? di sicuro non i software per win dove abbiamo un pannello di controllo per fare raid, OC controllato etc..
Sul sito ho visto i driver ma non mi sembrano un gran che, chi mi delucida?? ![]()
__________________
[HWU Debian Clan Official GOOGLER]-[GNU/Filosophy]-www.debianclan.org-[Debian SID User #\402616] ![]() {I AM NOT A GENIUS,I AM JUST NEVER SATISFIED AND VERY VERY PERSISTENT}-{carcass@jabber.linux.it} ![]() |
![]() |
![]() |
#19182 |
Senior Member
Iscritto dal: Dec 2004
Messaggi: 3573
|
Chiedo lumi al sommo maestro dello scripting
![]() http://www.quellicheilpc.com/forum/v...t=41281#415557 Per quanto riguarda l'estrapolazione del pid, esiste una funzione che restituisca direttamente la seconda colonna di ps aux, onde evitare quella porcheria? ![]() Inoltre, come avrai notato, ho reidirizzato l'stderr di Codice:
ps aux | sort -n +2 | tail -1 ![]() ![]() Per il momento è tutto, ma stai tranquillo che non mancherò di romperti le oo nuovamente in futuro ![]() ![]()
__________________
Debian amd64 | Gentoo amd64 | AMD Athlon64 3800+ X2@2701Mhz vcore 1.49V | Placing an unpatched Windows computer directly onto the Internet in the hope that it downloads the patches faster than it gets exploited are odds that you wouldn't bet on in Vegas | e-mail+jabber: darkbasic|a.t|linuxsystems|d.o.t|it | www.linuxsystems.it |
![]() |
![]() |
#19183 |
Senior Member
Iscritto dal: Dec 2001
Città: /dev/rotfl
Messaggi: 7276
|
non sono a casa, postami il risultato di:
ps aux | sort -n +2 | tail -1 e dimmi cosa vuoi ottenere
__________________
....::::fluxbox è talmente veloce che quando digito startx, il WM aspetta che il server Xorg lo raggiunga - PiloZ::::...
|
![]() |
![]() |
#19184 | |
Senior Member
Iscritto dal: Jun 2002
Città: Dublin
Messaggi: 5989
|
Quote:
Codice:
cat /proc/config Codice:
zcat /proc/config.gz
__________________
C'ho certi cazzi Mafa' che manco tu che sei pratica li hai visti mai! |
|
![]() |
![]() |
#19185 | |
Senior Member
Iscritto dal: Jun 2002
Città: Dublin
Messaggi: 5989
|
Quote:
![]()
__________________
C'ho certi cazzi Mafa' che manco tu che sei pratica li hai visti mai! |
|
![]() |
![]() |
#19186 |
Senior Member
Iscritto dal: Dec 2004
Messaggi: 3573
|
Codice:
niko@debian:~$ ps aux | sort -n +2 | tail -1 sort: Warning: "+number" syntax is deprecated, please use "-k number" niko 4663 2.7 5.6 166236 57760 ? S 15:03 1:04 konqueror [kdeinit] --silent Sono costretto a reindirizzare l'stderr perchè mi da quel warning maledetto... Lo script che ho realizzato funziona, ma mi puzza tanto ma tanto di "workaround"... ![]()
__________________
Debian amd64 | Gentoo amd64 | AMD Athlon64 3800+ X2@2701Mhz vcore 1.49V | Placing an unpatched Windows computer directly onto the Internet in the hope that it downloads the patches faster than it gets exploited are odds that you wouldn't bet on in Vegas | e-mail+jabber: darkbasic|a.t|linuxsystems|d.o.t|it | www.linuxsystems.it Ultima modifica di darkbasic : 03-01-2007 alle 14:44. |
![]() |
![]() |
#19187 |
Senior Member
Iscritto dal: Dec 2001
Città: /dev/rotfl
Messaggi: 7276
|
sort -n +2 lo usi perchè vuoi il primo processo nella lista che in teoria essendo in ordine di occupazione cpu potrebbe segnare 100?
5.6 è la cpu e 2.7 la ram o al contrario?
__________________
....::::fluxbox è talmente veloce che quando digito startx, il WM aspetta che il server Xorg lo raggiunga - PiloZ::::...
|
![]() |
![]() |
#19188 |
Senior Member
Iscritto dal: Dec 2004
Messaggi: 3573
|
Esatto, con sort -n +2 ordino in maniera crescente in base al valore numerico della terza colonna (occupazione cpu), dopodichè con tail prendo l'ultima riga che è quella che corrisponde all'occupazione maggiore di cpu, che non deve essere necessariamente 100%, ma deve comunque essere quella più altra fra tutti i processi in esecuzione.
Edit: la cpu è 2.7, la ram è il valore successivo. Ti faccio vedere un output senza tail (anche perchè mi sono accorto che se tutti i processi occupano lo 0% di cpu viene restituito USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND ![]() C'è una specie di "grep al contrario" che mi rimuova quella maledetta riga? Codice:
niko@debian:~$ ps aux | sort -n +2 sort: Warning: "+number" syntax is deprecated, please use "-k number" 103 3186 0.0 0.0 9520 848 ? Ss 14:33 0:00 /usr/bin/dbus-daemon --system 106 3194 0.0 0.4 19972 4608 ? Ss 14:33 0:01 /usr/sbin/hald 106 3201 0.0 0.0 9260 896 ? S 14:33 0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket 106 3208 0.0 0.0 9264 904 ? S 14:33 0:00 hald-addon-keyboard: listening on /dev/input/event2 106 3215 0.0 0.0 9264 904 ? S 14:33 0:00 hald-addon-keyboard: listening on /dev/input/event0 daemon 2671 0.0 0.0 4820 396 ? Ss 14:33 0:00 /sbin/portmap lp 3259 0.0 0.0 10064 536 ? Ss 14:33 0:00 /usr/sbin/lpd -s niko 3473 0.0 0.1 7484 1684 ? Ss 14:35 0:00 /bin/sh /usr/bin/startkde [...] root 769 0.0 0.0 0 0 ? S< 14:33 0:00 [scsi_eh_0] root 770 0.0 0.0 0 0 ? S< 14:33 0:00 [scsi_eh_1] root 791 0.0 0.0 0 0 ? S< 14:33 0:00 [scsi_eh_2] root 792 0.0 0.0 0 0 ? S< 14:33 0:00 [scsi_eh_3] root 798 0.0 0.0 0 0 ? S 14:33 0:00 [knodemgrd_0] statd 3311 0.0 0.1 7888 1084 ? Ss 14:33 0:00 /sbin/rpc.statd USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 3401 1.2 2.4 62728 25020 tty7 SLs+ 14:33 1:11 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/xauth/A:0-c5S8P2 niko 4663 2.4 5.6 166908 57932 ? S 15:03 1:40 konqueror [kdeinit] --silent ![]() Vabbè, tanto sono firewalled...
__________________
Debian amd64 | Gentoo amd64 | AMD Athlon64 3800+ X2@2701Mhz vcore 1.49V | Placing an unpatched Windows computer directly onto the Internet in the hope that it downloads the patches faster than it gets exploited are odds that you wouldn't bet on in Vegas | e-mail+jabber: darkbasic|a.t|linuxsystems|d.o.t|it | www.linuxsystems.it Ultima modifica di darkbasic : 03-01-2007 alle 15:17. |
![]() |
![]() |
#19189 |
Senior Member
Iscritto dal: Dec 2004
Messaggi: 3573
|
Sono riuscito a svecchiare la sintassi:
Codice:
ps aux | sort -nk 3 | tail -1 Resta da eliminare questa fastidiosissima riga Codice:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
__________________
Debian amd64 | Gentoo amd64 | AMD Athlon64 3800+ X2@2701Mhz vcore 1.49V | Placing an unpatched Windows computer directly onto the Internet in the hope that it downloads the patches faster than it gets exploited are odds that you wouldn't bet on in Vegas | e-mail+jabber: darkbasic|a.t|linuxsystems|d.o.t|it | www.linuxsystems.it |
![]() |
![]() |
#19190 |
Senior Member
Iscritto dal: Dec 2001
Città: /dev/rotfl
Messaggi: 7276
|
neinte da fare, da lavoro è un casino poterti aiutare
![]()
__________________
....::::fluxbox è talmente veloce che quando digito startx, il WM aspetta che il server Xorg lo raggiunga - PiloZ::::...
|
![]() |
![]() |
#19191 |
Senior Member
Iscritto dal: Dec 2004
Messaggi: 3573
|
Ti darei volentieri un account ssh sul mio serverino, ma la telecom mi ha nattato
![]()
__________________
Debian amd64 | Gentoo amd64 | AMD Athlon64 3800+ X2@2701Mhz vcore 1.49V | Placing an unpatched Windows computer directly onto the Internet in the hope that it downloads the patches faster than it gets exploited are odds that you wouldn't bet on in Vegas | e-mail+jabber: darkbasic|a.t|linuxsystems|d.o.t|it | www.linuxsystems.it |
![]() |
![]() |
#19192 |
Senior Member
Iscritto dal: Feb 2004
Città: BhO
Messaggi: 3701
|
ragazzi sto ricompilando (su scheda nvidia) ...ho impostato nel config l'avvio dei vesafb e quando sono andato(dopo aver ricompilato) ad installare i driver nvidia(presi da sito) mi dice che non è compatibile con vesafb...
quindi dovre abilitare il framebuffer nvidia togliendo completamente il vesafb??? prima quello nvidia non l'avevo abilitato perchè ricordavo di qualche incompatibilità...
__________________
il cucchiaio non esiste...MondoIT: recensioni, appunti di vita da nerd, virtualizzazione e altre diavolerie informatiche Linux User 414915 linux counter Ho concluso con yorick, gor, djgusmy85, sulphur, Rospaccio, Leland Gaunt, paciuli
|
![]() |
![]() |
#19193 | |
Senior Member
Iscritto dal: Dec 2001
Città: /dev/rotfl
Messaggi: 7276
|
Quote:
<PiloZ> da lavoro senza poter provare è impossibile ![]() chiedendo su irc da lavoro mi hanno dato questo: Codice:
#!/bin/sh ps aux > .top_tmpps ps=`cat .top_tmpps|awk {'print $3'}|grep -v CPU` maxvalue=00 j=0 n=0 echo -n "Checking for top usage cpu process.." for i in `echo -e $ps` ; do n=`expr $n + 1` cpuusagetmp=`echo $i | cut -f1 -d.` cpuusage="$cpuusagetmp`echo $i | cut -f2 -d.`" if [ $cpuusage -gt $maxvalue ]; then maxvalue=$cpuusage j=$n fi echo -ne "." j=`expr $j + 1` echo -ne "done.\nPid is: " head -n $j .top_tmpps | tail -n 1 | awk {'print $2'} rm .top_tmpps ![]()
__________________
....::::fluxbox è talmente veloce che quando digito startx, il WM aspetta che il server Xorg lo raggiunga - PiloZ::::...
|
|
![]() |
![]() |
#19194 |
Senior Member
Iscritto dal: Dec 2004
Messaggi: 3573
|
Grazie mille per l'aiuto, ma con l'ausilio di santo man sono riuscito a fare tutto con una semplicissima riga di codice
![]() ![]() Codice:
ps aux | sort -k 3 | tail -2 | head -1 | awk '{ print $2 }' Con tail prendo le ultime due righe dell'output, ovvero quella contentente il processo che occupa più cpu e le odiosissime intestazioni della tabella: Codice:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND Infine con l'amato awk ![]() ![]() Un dubbio mi è rimasto... se volessi tagliare/estrarre l'n-esima riga, c'è un comando che permette di farlo? In pratica vorrei sostituire Codice:
| tail -2 | head -1
__________________
Debian amd64 | Gentoo amd64 | AMD Athlon64 3800+ X2@2701Mhz vcore 1.49V | Placing an unpatched Windows computer directly onto the Internet in the hope that it downloads the patches faster than it gets exploited are odds that you wouldn't bet on in Vegas | e-mail+jabber: darkbasic|a.t|linuxsystems|d.o.t|it | www.linuxsystems.it Ultima modifica di darkbasic : 03-01-2007 alle 17:41. |
![]() |
![]() |
#19195 | |
Senior Member
Iscritto dal: May 2004
Messaggi: 7806
|
Quote:
![]()
__________________
[HWU Debian Clan Official GOOGLER]-[GNU/Filosophy]-www.debianclan.org-[Debian SID User #\402616] ![]() {I AM NOT A GENIUS,I AM JUST NEVER SATISFIED AND VERY VERY PERSISTENT}-{carcass@jabber.linux.it} ![]() |
|
![]() |
![]() |
#19196 | |
Senior Member
Iscritto dal: Dec 2001
Città: /dev/rotfl
Messaggi: 7276
|
Quote:
vesafb va inserito statico[*] CONFIG_FB_VESA=y vedi se il mio config ti può essere d'aiuto: LINK Ciao ![]()
__________________
....::::fluxbox è talmente veloce che quando digito startx, il WM aspetta che il server Xorg lo raggiunga - PiloZ::::...
|
|
![]() |
![]() |
#19197 | |
Senior Member
Iscritto dal: Dec 2001
Città: /dev/rotfl
Messaggi: 7276
|
Quote:
Ciao ![]()
__________________
....::::fluxbox è talmente veloce che quando digito startx, il WM aspetta che il server Xorg lo raggiunga - PiloZ::::...
|
|
![]() |
![]() |
#19198 |
Senior Member
Iscritto dal: Dec 2004
Messaggi: 3573
|
Ci sono riuscito, più ridotto all'osso di così non si può
![]() Codice:
ps aux | sort -rk 3 | sed -n -e 2p | awk '{ print $2 }'
__________________
Debian amd64 | Gentoo amd64 | AMD Athlon64 3800+ X2@2701Mhz vcore 1.49V | Placing an unpatched Windows computer directly onto the Internet in the hope that it downloads the patches faster than it gets exploited are odds that you wouldn't bet on in Vegas | e-mail+jabber: darkbasic|a.t|linuxsystems|d.o.t|it | www.linuxsystems.it |
![]() |
![]() |
#19199 | |
Senior Member
Iscritto dal: May 2004
Messaggi: 7806
|
Quote:
![]() ![]()
__________________
[HWU Debian Clan Official GOOGLER]-[GNU/Filosophy]-www.debianclan.org-[Debian SID User #\402616] ![]() {I AM NOT A GENIUS,I AM JUST NEVER SATISFIED AND VERY VERY PERSISTENT}-{carcass@jabber.linux.it} ![]() |
|
![]() |
![]() |
#19200 | |
Senior Member
Iscritto dal: Dec 2001
Città: /dev/rotfl
Messaggi: 7276
|
Quote:
<a href="http://"target="_blank">carchi</a> prima della t di target ci va lo spazio: <a href="http://link" target="_blank">carchi</a> Ciao ![]()
__________________
....::::fluxbox è talmente veloce che quando digito startx, il WM aspetta che il server Xorg lo raggiunga - PiloZ::::...
|
|
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 20:52.