root@test:/var/lib/tomcat/webapps/logs# ps aux | grep ppm
root     25522  0.0  0.0   1844   500 ?        SN   14:13   0:00 sh -c /bin/bash -c "pdftoppm -f 1 -l 1 /pdf/input.pdf test/processing/output"
 root     25523 49.6  0.7  18192 12620 ?        RN   14:13   0:59 pdftoppm -f 1 -l 1 /pdf/input.pdf /test/processing/output
root     25539  0.0  0.0   2016   636 ?        R+   14:15   0:00 grep ppm

I am not familiar with this command. Why two processes are running I can't understand.

有帮助吗?

解决方案

These are not two pdftoppm processes. The following is the pdftoppm process:

root     25523 49.6  0.7  18192 12620 ?        RN   14:13   0:59 pdftoppm -f 1 -l 1 /pdf/input.pdf /test/processing/output

The following is the process for the shell command:

root     25522  0.0  0.0   1844   500 ?        SN   14:13   0:00 sh -c /bin/bash -c "pdftoppm -f 1 -l 1 /pdf/input.pdf test/processing/output"

The first line in your grep output is for the shell command that was executed. The second line was for the actual pdftoppm invocation. The third line was for the grep. (Both your shell command and grep contained the string pdftoppm, which were a part of the process list when queried.)

其他提示

The shell script is most likely excuted via a system call (that's what it would be in c). This system call invokes a command processor (PID 25522 in your case) to interpret the command.

The command itselves is the process with PID 25523.

In C the exec command family executes a command without invoking a command line interpreter.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top