nohup 程序在后台运营 避免 xshell 卡死 通过 nohup.out分析调取系统命令时的异常分析
nohup 程序在后台运营 避免 xshell 卡死
[root@admin1 after_fc_distributed]# nohup /root/anaconda3/bin/python dataNode.py
nohup: 忽略输入并把输出追加到"nohup.out"
[root@admin1 ~]# ps -aux | grep py
root 747 0.0 0.2 327516 22508 ? Ssl 5月15 0:05 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
root 1120 0.0 0.2 553160 18780 ? Ssl 5月15 0:23 /usr/bin/python -Es /usr/sbin/tuned -l -P
root 15858 43.3 1.0 617020 81600 pts/1 Sl+ 20:14 3:50 /root/anaconda3/bin/python dataNode.py
root 16039 51.8 0.9 614812 77124 pts/3 Sl+ 20:17 2:44 /root/anaconda3/bin/python dataNode.py
root 16272 0.0 0.0 112724 964 pts/2 S+ 20:23 0:00 grep --color=auto py
[root@admin1 ~]#
[root@admin1 ~]# find / | grep nohup.out
/root/after_fc_distributed/nohup.out
[root@admin1 ~]# cat /root/after_fc_distributed/nohup.out
ffmpeg version 3.2-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.1 (Debian 5.4.1-3) 20161019
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libebur128 --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.100 / 57. 64.100
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[mp3 @ 0x41599c0] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'concat:mymp3tmp/50535395_0.mp3|mymp3tmp/50535395_1.mp3|mymp3tmp/50535395_2.mp3':
Duration: 00:03:13.50, start: 0.000000, bitrate: 16 kb/s
Stream #0:0: Audio: mp3, 16000 Hz, mono, s16p, 16 kb/s
Output #0, mp3, to 'mymp3_middle/1526559355_34058625mp3cut0.mp3':
Metadata:
TSSE : Lavf57.56.100
Stream #0:0: Audio: mp3, 16000 Hz, mono, 16 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size= 378kB time=00:03:13.46 bitrate= 16.0kbits/s speed=7.97e+03x
video:0kB audio:378kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.058140%
ffmpeg version 3.2-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.1 (Debian 5.4.1-3) 20161019
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libebur128 --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.100 / 57. 64.100
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, mp3, from 'concat:mymp3_middle/1526559355_34058625mp3cut0.mp3':
Metadata:
encoder : Lavf57.56.100
Duration: 00:03:13.50, start: 0.033063, bitrate: 16 kb/s
Stream #0:0: Audio: mp3, 16000 Hz, mono, s16p, 16 kb/s
Output #0, mp3, to 'mymp3_middle/1526559358_34058625.mp3':
Metadata:
TSSE : Lavf57.56.100
Stream #0:0: Audio: mp3, 16000 Hz, mono, 16 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size= 378kB time=00:03:13.43 bitrate= 16.0kbits/s speed=5.12e+03x
video:0kB audio:378kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.052193%
ffmpeg version 3.2-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.1 (Debian 5.4.1-3) 20161019
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libebur128 --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.100 / 57. 64.100
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, mp3, from 'mymp3_middle/1526559358_34058625.mp3':
Metadata:
encoder : Lavf57.56.100
Duration: 00:03:13.50, start: 0.033063, bitrate: 16 kb/s
Stream #0:0: Audio: mp3, 16000 Hz, mono, s16p, 16 kb/s
Input #1, avi, from 'myvtmp/off34058625_50535395_5.avi':
Duration: 00:03:13.50, start: 0.000000, bitrate: 17805 kb/s
Stream #1:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj420p(pc, bt470bg/unknown/unknown), 1200x414 [SAR 1:1 DAR 200:69], 17806 kb/s, 20 fps, 20 tbr, 20 tbn, 20 tbc
No pixel format specified, yuvj420p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x46f1660] using SAR=1/1
[libx264 @ 0x46f1660] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x46f1660] profile High, level 3.1
[libx264 @ 0x46f1660] 264 - core 148 r292 72d53ab - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=20 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'myvres/off34058625_50535395_5.mp4':
Metadata:
encoder : Lavf57.56.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj420p(pc), 1200x414 [SAR 1:1 DAR 200:69], q=-1--1, 20 fps, 10240 tbn, 20 tbc
Metadata:
encoder : Lavc57.64.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 16000 Hz, mono, fltp, 69 kb/s
Metadata:
encoder : Lavc57.64.100 aac
Stream mapping:
Stream #1:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (mp3 (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 79 fps=0.0 q=28.0 size= 67kB time=00:00:01.47 bitrate= 372.9kbits/s speed=frame= 138 fps=136 q=28.0 size= 96kB time=00:00:04.48 bitrate= 175.5kbits/s speed=frame= 195 fps=128 q=28.0 size= 125kB time=00:00:07.36 bitrate= 138.8kbits/s speed=[root@admin1 ~]#
通过 nohup.out分析调取系统命令时的异常分析