Arquivo
“VI” Inserir palavar ou caracter no começo de cada linha
Inserir palavar ou caracter no começo de cada linha
:%s/^/’ /
Inserir palavar ou caracter no final de cada linha
:%s/$/’ /
Cpu usage diagnose
Top 10 processes most recently on the CPU, generally this is USer time
# ps -fe | sort -nk4 | tail
Top 20 kernel processes most recently on the CPU, generally this is SYstem time
# ps -fk | sort -nk4 | grep -v -e wait -e sched -e swapper | tail -22
Biggest Kernel offenders I see are generally, lrud, j2pg, vtiol.
LRUD = Scanning for free memory and freeing pages. Can be tuned.
J2PG = I think is something to do with JFS2 pages. Maybe something to do
with seaching the JFS2 cache for pages and/or reading JFS2 pages (pageIn/Out).
VTIOL = Something to do with offloading iodones from the adapter to the CPU.
# Top 20 Kernel and User processes who have consumed the most CPU since process started.
# ps guw | head -22
Habilitar e desabilitar o Audit no AIX
Habilitar e desabilitar o Audit no AIX
1 – audit off
2 – audit shutdown
3 – audit on
Caso a opção 1 e 2 não funcione, use o comando #> /audit/trail
e inicie o audit.
Excluindo espaço em branco de arquivos
Excluindo espaço em branco de arquivos
No linux
#sed -i ‘/^$/d’ file.txt
No Unix
#sed -e ‘/^$/d’ file.txt > file_sem_espaco.txt
10 processos que mais estão consumindo memória.
10 processos que mais estão consumindo memória.
$svmon -Pt15 | perl -e ‘while(<>){print if($.==2||$&&&!$s++);$.=0 if(/^-+$/)}’; date
Listando processos com wchan
Listando processos com wait channel do kernel.
ps -eopid,tt,user,fname,tmout,f,wchan
Apagando linhas em branco no Linux / Unix
Comando para o VI
:g/^$/d
GNU Linux
sed -i ‘/^$/d’ arquivo.txt
Unix -> AIX / HPUX / Solaris
sed ‘/^$/d’ arquivo.txt > arquivo_sem_linhas.txt