Re: comando batch
Bruno de Oliveira Schneider
> On 1/25/06, Francisco Welington de Sousa Lima wrote:
>> Oi Gentil,
>> infelizmente não funcionou até 20 minutos.
>
> Para mim, não ficou claro se o processo morre mesmo usando o nohup, pois
> você não usou nohup no script do gentil e com relação ao "nohup
> ./m16z2n9 &" você disse "usei com o programa rodando e devo usar com
> program sem rodar", que eu não entendo (aliás você podia tentar
> escrever mais claramente - revise sua mensagem antes de enviar).
Situação atual rodando com área aberta
wel@voronoi:/var/log$ ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 1504 512 ? S Jan24 0:00 init [2]
root 2 0.0 0.0 0 0 ? SN Jan24 0:00 [ksoftirqd/0]
root 3 0.0 0.0 0 0 ? S< Jan24 0:03 [events/0]
root 4 0.0 0.0 0 0 ? S< Jan24 0:00 [khelper]
root 5 0.0 0.0 0 0 ? S< Jan24 0:00 [kacpid]
root 36 0.0 0.0 0 0 ? S< Jan24 0:00 [kblockd/0]
root 46 0.0 0.0 0 0 ? S Jan24 0:00 [pdflush]
root 47 0.0 0.0 0 0 ? S Jan24 0:00 [pdflush]
root 49 0.0 0.0 0 0 ? S< Jan24 0:00 [aio/0]
root 48 0.0 0.0 0 0 ? S Jan24 0:00 [kswapd0]
root 191 0.0 0.0 0 0 ? S Jan24 0:00 [kseriod]
root 300 0.0 0.0 0 0 ? S Jan24 0:00 [kjournald]
root 552 0.0 0.0 0 0 ? S Jan24 0:00 [kjournald]
root 701 0.0 0.0 0 0 ? S< Jan24 0:00 [ata/0]
root 702 0.0 0.0 0 0 ? S Jan24 0:00 [scsi_eh_0]
root 703 0.0 0.0 0 0 ? S Jan24 0:00 [scsi_eh_1]
root 767 0.0 0.0 0 0 ? S Jan24 0:00 [khubd]
root 1022 0.0 0.0 0 0 ? S Jan24 0:00
[pciehpd_event]
root 1042 0.0 0.0 0 0 ? S Jan24 0:00
[shpchpd_event]
root 1693 0.0 0.0 2376 864 ? Ss Jan24 0:00 dhclient -e
-pf /
daemon 1698 0.0 0.0 1612 464 ? Ss Jan24 0:00 /sbin/portmap
root 2051 0.0 0.0 2260 820 ? Ss Jan24 0:00 /sbin/syslogd
root 2054 0.0 0.1 2436 1496 ? Ss Jan24 0:00 /sbin/klogd
Debian- 2094 0.0 0.1 5140 1720 ? Ss Jan24 0:00
/usr/sbin/exim4 -
root 2101 0.0 0.0 2240 728 ? Ss Jan24 0:00
/usr/sbin/inetd
lp 2127 0.0 0.0 2464 884 ? Ss Jan24 0:00
/usr/sbin/lpd -s
root 2136 0.0 0.1 3468 1504 ? Ss Jan24 0:00 /usr/sbin/sshd
root 2140 0.0 0.1 2376 924 ? Ss Jan24 0:00
/sbin/rpc.statd
daemon 2143 0.0 0.0 1684 660 ? Ss Jan24 0:00 /usr/sbin/atd
root 2146 0.0 0.0 1756 716 ? Ss Jan24 0:00 /usr/sbin/cron
root 2153 0.0 0.2 4512 2232 ? S Jan24 0:00
/usr/sbin/apache
www-data 2154 0.0 0.2 4512 2224 ? S Jan24 0:00
/usr/sbin/apache
www-data 2155 0.0 0.2 4512 2224 ? S Jan24 0:00
/usr/sbin/apache
www-data 2156 0.0 0.2 4512 2224 ? S Jan24 0:00
/usr/sbin/apache
www-data 2157 0.0 0.2 4512 2224 ? S Jan24 0:00
/usr/sbin/apache
www-data 2158 0.0 0.2 4512 2224 ? S Jan24 0:00
/usr/sbin/apache
root 2163 0.0 0.2 9264 2368 ? Ss Jan24 0:00 /usr/bin/gdm
root 2174 0.0 0.0 1500 484 tty1 Ss+ Jan24 0:00 /sbin/getty
38400
root 2177 0.0 0.0 1500 484 tty2 Ss+ Jan24 0:00 /sbin/getty
38400
root 2178 0.0 0.0 1500 484 tty3 Ss+ Jan24 0:00 /sbin/getty
38400
root 2179 0.0 0.0 1500 484 tty4 Ss+ Jan24 0:00 /sbin/getty
38400
root 2180 0.0 0.0 1500 484 tty5 Ss+ Jan24 0:00 /sbin/getty
38400
root 2181 0.0 0.0 1500 484 tty6 Ss+ Jan24 0:00 /sbin/getty
38400
root 2479 0.0 0.3 9844 3080 ? S Jan24 0:00 /usr/bin/gdm
root 2490 0.1 1.2 95360 11752 ? S Jan24 6:47
/usr/X11R6/bin/X
alexand 2933 28.3 0.2 5852 2440 ? R Jan24 1077:32 ./tania4
alexand 2957 28.3 0.2 5896 2564 ? R Jan24 1076:54 ./m01
alexand 2984 28.3 0.2 5896 2544 ? R Jan24 1076:04 ./m00
wel 5205 0.0 0.1 2284 1048 ? S Jan26 0:00 /bin/bash
./genti
wel 6193 0.0 0.1 2292 1080 ? Ss Jan26 0:00 /bin/sh
/usr/bin/
wel 6228 0.0 0.1 2988 908 ? Ss Jan26 0:00
/usr/bin/ssh-agen
wel 6250 0.0 1.0 22452 9868 ? Ss Jan26 0:00 kdeinit
Running..
wel 6253 0.0 0.9 21752 8768 ? S Jan26 0:00 kdeinit:
dcopserv
wel 6257 0.0 1.0 22472 9840 ? S Jan26 0:00 kdeinit:
klaunche
wel 6260 0.0 1.3 24500 12528 ? S Jan26 0:00 kdeinit: kded
wel 6269 0.0 0.7 12056 6956 ? S Jan26 0:00
/usr/bin/artsd -F
wel 6274 0.0 1.6 30320 14872 ? S Jan26 0:00 kdeinit:
knotify
wel 6275 0.0 0.0 1496 332 ? S Jan26 0:00 kwrapper
ksmserve
wel 6277 0.0 1.2 22604 11108 ? S Jan26 0:00 kdeinit:
ksmserve
wel 6278 0.0 1.4 24668 13292 ? S Jan26 0:01 kdeinit:
kwin -se
wel 6281 0.0 1.2 23016 11424 ? S Jan26 0:00 kdeinit:
khotkeys
wel 6283 0.0 1.6 26476 15080 ? S Jan26 0:00 kdeinit:
kdesktop
wel 6285 0.0 1.7 27672 16064 ? S Jan26 0:01 kdeinit:
kicker
wel 6289 0.0 1.3 23924 12496 ? S Jan26 0:00 kdeinit:
klipper
wel 6291 0.0 1.1 23276 10568 ? S Jan26 0:00 kdeinit:
kio_file
wel 6296 0.0 1.6 26352 14712 ? S Jan26 0:01 kdeinit:
konsole
wel 6297 0.0 0.1 2648 1552 pts/1 Ss+ Jan26 0:00 /bin/bash
wel 6426 0.0 2.3 30824 21464 ? S Jan26 0:01 kdeinit:
konquero
wel 6730 0.0 0.1 2644 1540 pts/1 S Jan26 0:00 /bin/bash
wel 6731 24.9 5.2 49376 47872 pts/1 R Jan26 212:43 ./m16z2n9
wel 24128 1.2 3.2 83748 29804 ? S 09:03 0:23
/usr/lib/mozilla-
wel 24139 0.0 0.2 3632 2252 ? S 09:03 0:00
/usr/lib/gconf2/g
wel 24361 0.1 1.6 26292 14616 ? S 09:07 0:01 kdeinit:
konsole
wel 24363 0.0 0.1 2628 1528 pts/3 Ss 09:07 0:00 /bin/bash
wel 26112 0.0 0.0 1720 516 ? S 09:35 0:00 sleep 1
wel 26113 0.0 0.0 2500 848 pts/3 R+ 09:35 0:00 ps aux
wel@voronoi:/var/log$
vou colocar o ./m16z2n20 para rodar, veja.
voronoi:~/voteMUBA> ./m16z2n20 &
[1] 26277
voronoi:~/voteMUBA> exit
exit
wel@voronoi:~$
wel@voronoi:~$ ps ux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
wel 5205 0.0 0.1 2284 1048 ? S Jan26 0:00 /bin/bash
./genti
wel 6193 0.0 0.1 2292 1080 ? Ss Jan26 0:00 /bin/sh
/usr/bin/
wel 6228 0.0 0.1 2988 908 ? Ss Jan26 0:00
/usr/bin/ssh-agen
wel 6250 0.0 1.0 22452 9868 ? Ss Jan26 0:00 kdeinit
Running..
wel 6253 0.0 0.9 21752 8768 ? S Jan26 0:00 kdeinit:
dcopserv
wel 6257 0.0 1.0 22472 9840 ? S Jan26 0:00 kdeinit:
klaunche
wel 6260 0.0 1.3 24500 12528 ? S Jan26 0:00 kdeinit: kded
wel 6269 0.0 0.7 12056 6956 ? S Jan26 0:00
/usr/bin/artsd -F
wel 6274 0.0 1.6 30320 14872 ? S Jan26 0:00 kdeinit:
knotify
wel 6275 0.0 0.0 1496 332 ? S Jan26 0:00 kwrapper
ksmserve
wel 6277 0.0 1.2 22604 11108 ? S Jan26 0:00 kdeinit:
ksmserve
wel 6278 0.0 1.4 24668 13292 ? S Jan26 0:01 kdeinit:
kwin -se
wel 6281 0.0 1.2 23016 11424 ? S Jan26 0:00 kdeinit:
khotkeys
wel 6283 0.0 1.6 26476 15080 ? S Jan26 0:00 kdeinit:
kdesktop
wel 6285 0.0 1.7 27672 16064 ? S Jan26 0:01 kdeinit:
kicker
wel 6289 0.0 1.3 23924 12496 ? S Jan26 0:00 kdeinit:
klipper
wel 6291 0.0 1.1 23276 10568 ? S Jan26 0:00 kdeinit:
kio_file
wel 6296 0.0 1.6 26352 14712 ? S Jan26 0:01 kdeinit:
konsole
wel 6297 0.0 0.1 2648 1552 pts/1 Ss+ Jan26 0:00 /bin/bash
wel 6426 0.0 2.3 30824 21464 ? S Jan26 0:01 kdeinit:
konquero
wel 6730 0.0 0.1 2644 1540 pts/1 S Jan26 0:00 /bin/bash
wel 6731 24.9 5.2 49376 47872 pts/1 R Jan26 213:38 ./m16z2n9
wel 24128 1.2 3.2 83748 29804 ? S 09:03 0:26
/usr/lib/mozilla-
wel 24139 0.0 0.2 3632 2252 ? S 09:03 0:00
/usr/lib/gconf2/g
wel 24361 0.1 1.6 26388 14680 ? S 09:07 0:02 kdeinit:
konsole
wel 24363 0.0 0.1 2628 1528 pts/3 Ss 09:07 0:00 /bin/bash
wel 26277 19.1 5.2 49376 47792 pts/3 R 09:38 0:15 ./m16z2n20
wel 26356 0.0 0.0 1720 516 ? S 09:39 0:00 sleep 1
wel 26357 0.0 0.0 2500 844 pts/3 R+ 09:39 0:00 ps ux
wel@voronoi:~$
Ele rodara até terminar daqui há uns 3 dias se a área ficar aberta , seu
eu fechar a área ele morre em vinte minutos.
>
> Com relação ao arquivo que deixaria um usuário rodar programas em
> segundo plano, isso não existe. Também não consigo pensar em nada da
> configuração de um usuário que causaria esse problema. Você tem
> certeza que os processos não morrem quando são executados por outros
> usuários? Crie um outro usuário para você e faça testes. O kernel tem
> tem uma política de limites para execução de processos, podendo matar um
> processo que ocupou a CPU mais tempo que o permitido ou que usou mais
> memória que o permitido, porém a configuração padrão dos Debian vem sem
> limite nenhum. O kernel também pode matar processos quando acaba a
> memória livre - alguma chance disso estar acontecendo no seu micro? De
> qualquer forma, se o kernel mata algum processo, deve deixar mensagens
> úteis em /var/log/messages. Verifique.
meu /var/log/messages está vazio
>
> Se você deixar o programa rodando em primeiro plano, sem fechar o
> terminal, o processo também morre depois de um tempo? Aparece alguma
> mensagem sobre o término do processo?
Não aparece menssagens.
>
> Acho também que não custa tentar o tal screen, na pior das hipóteses, o
> fato dele resolver ou não o problema já é uma informação a mais.
>
> --
> Bruno de Oliveira Schneider
> http://www.dcc.ufla.br/~bruno/
F. W. S. Lima
Departamento de Física
Centro de Ciência da Natureza
Campus Petrônio Portela
Universidade Federal do Piauí
Teresina-Piauí-Brasil
wel@ufpi.br,wel@fisica.ufc.br, wel@sobral.org
Reply to: