Full Command Not Shown
Full Command Not Shown
Top and htop and ps and even ls -l /proc/<pid>/exe have always shown the full command on all of my centos7 systems. For instance:
# ps aux|grep -v grep|grep php
serginho 107920 1.3 0.4 470788 33576 ? D 03:56 0:00 /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/serginho/public_html/index.php
Now on my latest server it shows the php executable, but not the php script that is being executed. Example:
# ps aux|grep -v grep|grep php
canadarm 11967 0.0 0.2 299220 36272 ? R 03:59 0:00 /opt/cpanel/ea php73/root/usr/bin/php-cgi
Can anyone think of a way to make the rest of the command show up?
# ps aux|grep -v grep|grep php
serginho 107920 1.3 0.4 470788 33576 ? D 03:56 0:00 /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/serginho/public_html/index.php
Now on my latest server it shows the php executable, but not the php script that is being executed. Example:
# ps aux|grep -v grep|grep php
canadarm 11967 0.0 0.2 299220 36272 ? R 03:59 0:00 /opt/cpanel/ea php73/root/usr/bin/php-cgi
Can anyone think of a way to make the rest of the command show up?
Re: Full Command Not Shown
I tried uninstalling the php package and reinstalling it, and that didn't help. Any other ideas?
Re: Full Command Not Shown
Hummmmm. There is the possibility that there is a scroll bar on the bottom and the command simply scrolled off the screen. If there is a scroll bar (L->R), then if you scroll R you will see the rest of the command.Krydos wrote: ↑2020/01/20 04:02:01Top and htop and ps and even ls -l /proc/<pid>/exe have always shown the full command on all of my centos7 systems. For instance:
# ps aux|grep -v grep|grep php
serginho 107920 1.3 0.4 470788 33576 ? D 03:56 0:00 /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/serginho/public_html/index.php
Now on my latest server it shows the php executable, but not the php script that is being executed. Example:
# ps aux|grep -v grep|grep php
canadarm 11967 0.0 0.2 299220 36272 ? R 03:59 0:00 /opt/cpanel/ea php73/root/usr/bin/php-cgi
Can anyone think of a way to make the rest of the command show up?
Alternately if there is NO scroll bar simply using the the R -> key will show the rest of the command. This happens with Midnight Commander (mc) in edit mode, otherwise in view mode the command simply wraps around. If you press a character key once you reach the end of the line it will go on indefinitely so long as you you hold the key down. What you will see is that the beginning of the command (on the left side of the screen) will have "disappeared". Of course it did not "disappear" it simply ran off the end of the monitor.
You could prove this if you were to start at the beginning of the command and simply highlight the command and dragging -->R.
For FUN (and just because you can) trying making the font smaller. With a smaller font more characters will show up on the screen and may reveal the rest of the command.
Beyond that there maybe some command that sets the maximum number of characters per line before auto-wrap kicks in and wraps the command to the next line. It maybe something as simple as finding something that says auto-wrap On or Off (or 1 or 0) in some config file somewhere.
These are of course all guesses, but they are based on my own experiences of a similar nature. It is time to go hacking but I *suspect* if it is like mc the command simply scrolls off the "page".
Re: Full Command Not Shown
Check your environment, especially such variables as COLUMNS, CMD_ENV, POSIXLY_CORRECT, PS_PERSONALITY, and so on (see the full list of environment variables that may affect the output of ps in its manpage). Also check that you're running /usr/bin/ps and not some redefined shell alias/function named ps.
E.g. on my system COLUMNS=20 ps aux|grep /[p]hp gives me
while ps aux|grep /[p]hp would give
Another thought. Is there a space in the path?
Also, please show the output of
E.g. on my system COLUMNS=20 ps aux|grep /[p]hp gives me
Code: Select all
root 1501 0.0 0.5 332424 22124 ? Ss Jan30 0:00 /usr/bin/php -q
root 1503 0.0 0.5 332424 22104 ? Ss Jan30 0:00 /usr/bin/php -q
root 1505 0.0 0.5 332424 22136 ? Ss Jan30 0:00 /usr/bin/php -q
root 1507 0.0 0.5 332424 22156 ? Ss Jan30 0:00 /usr/bin/php -q
root 1509 0.0 0.5 332424 22052 ? Ss Jan30 0:00 /usr/bin/php -q
root 1511 0.0 0.5 332424 21980 ? Ss Jan30 0:00 /usr/bin/php -q
root 1513 0.0 0.5 332424 22044 ? Ss Jan30 0:00 /usr/bin/php -q
root 1525 0.0 0.4 336768 17916 ? S Jan30 4:17 /usr/bin/php -q
root 1526 0.0 0.4 336624 16804 ? S Jan30 4:14 /usr/bin/php -q
root 1527 0.0 0.4 336624 16824 ? S Jan30 4:07 /usr/bin/php -q
root 1528 0.0 0.4 336624 16876 ? S Jan30 4:07 /usr/bin/php -q
root 1529 0.3 0.9 369396 38204 ? S Jan30 14:41 /usr/bin/php -q
root 1530 0.0 0.4 338676 18720 ? S Jan30 4:33 /usr/bin/php -q
root 1531 0.0 0.4 336624 16492 ? S Jan30 3:42 /usr/bin/php -q
Code: Select all
root 1501 0.0 0.5 332424 22124 ? Ss Jan30 0:00 /usr/bin/php -q /opt/fog/service/FOGSnapinHash/FOGSnapinHash &
root 1503 0.0 0.5 332424 22104 ? Ss Jan30 0:00 /usr/bin/php -q /opt/fog/service/FOGSnapinReplicator/FOGSnapinReplicator &
root 1505 0.0 0.5 332424 22136 ? Ss Jan30 0:00 /usr/bin/php -q /opt/fog/service/FOGTaskScheduler/FOGTaskScheduler &
root 1507 0.0 0.5 332424 22156 ? Ss Jan30 0:00 /usr/bin/php -q /opt/fog/service/FOGImageReplicator/FOGImageReplicator &
root 1509 0.0 0.5 332424 22052 ? Ss Jan30 0:00 /usr/bin/php -q /opt/fog/service/FOGImageSize/FOGImageSize &
root 1511 0.0 0.5 332424 21980 ? Ss Jan30 0:00 /usr/bin/php -q /opt/fog/service/FOGMulticastManager/FOGMulticastManager &
root 1513 0.0 0.5 332424 22044 ? Ss Jan30 0:00 /usr/bin/php -q /opt/fog/service/FOGPingHosts/FOGPingHosts &
root 1525 0.0 0.4 336768 17916 ? S Jan30 4:17 /usr/bin/php -q /opt/fog/service/FOGTaskScheduler/FOGTaskScheduler &
root 1526 0.0 0.4 336624 16804 ? S Jan30 4:14 /usr/bin/php -q /opt/fog/service/FOGSnapinReplicator/FOGSnapinReplicator &
root 1527 0.0 0.4 336624 16824 ? S Jan30 4:07 /usr/bin/php -q /opt/fog/service/FOGImageSize/FOGImageSize &
root 1528 0.0 0.4 336624 16876 ? S Jan30 4:07 /usr/bin/php -q /opt/fog/service/FOGSnapinHash/FOGSnapinHash &
root 1529 0.3 0.9 369396 38216 ? S Jan30 14:42 /usr/bin/php -q /opt/fog/service/FOGMulticastManager/FOGMulticastManager &
root 1530 0.0 0.4 338676 18720 ? S Jan30 4:33 /usr/bin/php -q /opt/fog/service/FOGImageReplicator/FOGImageReplicator &
root 1531 0.0 0.4 336624 16492 ? S Jan30 3:42 /usr/bin/php -q /opt/fog/service/FOGPingHosts/FOGPingHosts &
root 14505 0.0 0.4 342248 19412 ? Ss Feb01 0:12 php-fpm: master process (/etc/php-fpm.conf)
Do you get this problem only for PHP processes or for any processes with long command lines? If the latter is true then what output do you get for ps auxww? And for ps axwwopid,cmd?
Also, please show the output of
Code: Select all
echo $TERM
echo $COLUMNS
stty -a
Last edited by sml on 2020/02/03 15:40:49, edited 1 time in total.
Re: Full Command Not Shown
Just for FUN I decided to run your commands here is what I got:sml wrote: ↑2020/02/02 17:48:37Check your environment, especially such variables as COLUMNS, CMD_ENV, POSIXLY_CORRECT, PS_PERSONALITY, and so on (see the full list of environment variables that may affect the output of ps in its manpage). Also check that you're running /usr/bin/ps and not some redefined shell alias/function named ps.
E.g. on my system COLUMNS=20 ps aux|grep /[p]hp gives mewhile ps aux|grep /[p]hp would giveCode: Select all
root 1501 0.0 0.5 332424 22124 ? Ss Jan30 0:00 /usr/bin/php -q root 1503 0.0 0.5 332424 22104 ? Ss Jan30 0:00 /usr/bin/php -q root 1505 0.0 0.5 332424 22136 ? Ss Jan30 0:00 /usr/bin/php -q root 1507 0.0 0.5 332424 22156 ? Ss Jan30 0:00 /usr/bin/php -q root 1509 0.0 0.5 332424 22052 ? Ss Jan30 0:00 /usr/bin/php -q root 1511 0.0 0.5 332424 21980 ? Ss Jan30 0:00 /usr/bin/php -q root 1513 0.0 0.5 332424 22044 ? Ss Jan30 0:00 /usr/bin/php -q root 1525 0.0 0.4 336768 17916 ? S Jan30 4:17 /usr/bin/php -q root 1526 0.0 0.4 336624 16804 ? S Jan30 4:14 /usr/bin/php -q root 1527 0.0 0.4 336624 16824 ? S Jan30 4:07 /usr/bin/php -q root 1528 0.0 0.4 336624 16876 ? S Jan30 4:07 /usr/bin/php -q root 1529 0.3 0.9 369396 38204 ? S Jan30 14:41 /usr/bin/php -q root 1530 0.0 0.4 338676 18720 ? S Jan30 4:33 /usr/bin/php -q root 1531 0.0 0.4 336624 16492 ? S Jan30 3:42 /usr/bin/php -q
Another thought. Is there a space in the path?Code: Select all
root 1501 0.0 0.5 332424 22124 ? Ss Jan30 0:00 /usr/bin/php -q /opt/fog/service/FOGSnapinHash/FOGSnapinHash & root 1503 0.0 0.5 332424 22104 ? Ss Jan30 0:00 /usr/bin/php -q /opt/fog/service/FOGSnapinReplicator/FOGSnapinReplicator & root 1505 0.0 0.5 332424 22136 ? Ss Jan30 0:00 /usr/bin/php -q /opt/fog/service/FOGTaskScheduler/FOGTaskScheduler & root 1507 0.0 0.5 332424 22156 ? Ss Jan30 0:00 /usr/bin/php -q /opt/fog/service/FOGImageReplicator/FOGImageReplicator & root 1509 0.0 0.5 332424 22052 ? Ss Jan30 0:00 /usr/bin/php -q /opt/fog/service/FOGImageSize/FOGImageSize & root 1511 0.0 0.5 332424 21980 ? Ss Jan30 0:00 /usr/bin/php -q /opt/fog/service/FOGMulticastManager/FOGMulticastManager & root 1513 0.0 0.5 332424 22044 ? Ss Jan30 0:00 /usr/bin/php -q /opt/fog/service/FOGPingHosts/FOGPingHosts & root 1525 0.0 0.4 336768 17916 ? S Jan30 4:17 /usr/bin/php -q /opt/fog/service/FOGTaskScheduler/FOGTaskScheduler & root 1526 0.0 0.4 336624 16804 ? S Jan30 4:14 /usr/bin/php -q /opt/fog/service/FOGSnapinReplicator/FOGSnapinReplicator & root 1527 0.0 0.4 336624 16824 ? S Jan30 4:07 /usr/bin/php -q /opt/fog/service/FOGImageSize/FOGImageSize & root 1528 0.0 0.4 336624 16876 ? S Jan30 4:07 /usr/bin/php -q /opt/fog/service/FOGSnapinHash/FOGSnapinHash & root 1529 0.3 0.9 369396 38216 ? S Jan30 14:42 /usr/bin/php -q /opt/fog/service/FOGMulticastManager/FOGMulticastManager & root 1530 0.0 0.4 338676 18720 ? S Jan30 4:33 /usr/bin/php -q /opt/fog/service/FOGImageReplicator/FOGImageReplicator & root 1531 0.0 0.4 336624 16492 ? S Jan30 3:42 /usr/bin/php -q /opt/fog/service/FOGPingHosts/FOGPingHosts & root 14505 0.0 0.4 342248 19412 ? Ss Feb01 0:12 php-fpm: master process (/etc/php-fpm.conf)
Do you get this problem only for PHP processes or for any processes with long command lines? If the later is true then what output do you get for ps auxww? And for ps axwwopid,cmd?
Also, please show the output ofCode: Select all
echo $TERM echo $COLUMNS stty -a
Code: Select all
echo $TERM
echo $COLUMNS
stty -a
root@leopard/home/dcat]/>echo $TERM
xterm-256color
[root@leopard/home/dcat]/>echo $COLUMNS
146
[root@leopard/home/dcat]/>stty -a
speed 38400 baud; rows 36; columns 146; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z;
rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke
Mind you NONE of this makes any sense to me at all, but for those who know what they are looking at this provides another data set, as my system is pure stock ie. I have not tweaked anything other than the prompt which is custom. The other minor (major? ) difference is that I am running zsh, not bash.
The thing that pops out at me is eol (End Of Line ?) = undef (Undefined ?), though I am not quite sure what this eol2 (End Of Line2 ???) = undef (also Undefined ?). That said as I type this when I reach the End of the Line it Auto-wraps to the next line. This suggests to me that the problem may be in some programs the auto-wrap function is turned OFF probably so when editing code you can see if there any space where there should be none, and vice versa; however once you SAVE the file the Auto-wrap function is turned so so everything fits the page. Just a guess.
Re: Full Command Not Shown
These are control characters that may be used by terminal driver to mark the end of line in addition to NL.
Re: Full Command Not Shown
I'm using putty to ssh in, and there is no scroll bar.
Using the arrow keys, left and right, doesn't reveal anything else.desertcat wrote: ↑2020/02/02 16:56:16Alternately if there is NO scroll bar simply using the the R -> key will show the rest of the command. This happens with Midnight Commander (mc) in edit mode, otherwise in view mode the command simply wraps around. If you press a character key once you reach the end of the line it will go on indefinitely so long as you you hold the key down. What you will see is that the beginning of the command (on the left side of the screen) will have "disappeared". Of course it did not "disappear" it simply ran off the end of the monitor.
Highlighting and dragging doesn't reveal anything else either.
Thanks for the suggestions. This didn't reveal anything else either unforntunately.
Putty seems to send the current width of the window to the server when it is resized.desertcat wrote: ↑2020/02/02 16:56:16Beyond that there maybe some command that sets the maximum number of characters per line before auto-wrap kicks in and wraps the command to the next line. It maybe something as simple as finding something that says auto-wrap On or Off (or 1 or 0) in some config file somewhere.
By default it's set to 80, but when I resize the putty window it changes to whatever width I drag it to.
These are all null.
Same output whether I run ps or /usr/bin/ps.
No, it's a dash between ea and php. Re-reading my top post, I'm not sure why it copy-pasted as a space there, but I have confirmed that the dash exists on both the server that works and the server that doesn't.
It's only the php processes. For instance, ps auxww results in
which is ridiculously long, and contains many spaces and dashes and all sorts of stuff.nobody 24453 3.2 4.1 6838412 679112 ? Sl 07:27 1:07 /usr/bin/java -Djava.util.logging.config.file=/opt/tomcat/live/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.awt.headless=true -server -Xms48m -Xmx1024M -XX:MaxPermSize=512m -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dignore.endorsed.dirs= -classpath /opt/tomcat/live/bin/bootstrap.jar:/opt/tomcat/live/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat/live -Dcatalina.home=/opt/tomcat/live -Djava.io.tmpdir=/opt/tomcat/live/temp org.apache.catalina.startup.Bootstrap start
sml wrote: ↑2020/02/02 17:48:37Also, please show the output ofCode: Select all
echo $TERM echo $COLUMNS stty -a
Code: Select all
# echo $TERM
xterm
# echo $COLUMNS
207
# stty -a
speed 38400 baud; rows 61; columns 207; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke
Re: Full Command Not Shown
Your terminal settings look OK. I'd say it's probably the PHP script itself that tampers with the process title somewhere. Look for cli_set_process_title and/or setproctitle in the PHP code.
Re: Full Command Not Shown
I don't see either of those php functions in any of the php scripts. All of the php scripts do this, even something as simple as
Code: Select all
<?php
phpinfo();
Re: Full Command Not Shown
Just a wild guess. What's the value of cgi.fix_pathinfo in your php.ini?