I've been debugging this for weeks on a scratch install on Ubuntu 24.04 running on a MacPro 3,1 and can't get ASTsend screen to activate
Hear me out, I think I found the problem and it has to do on how the script looks for the listen screen
Here is the perl script section that checks for the listen screen from AST_manager_send.pl :
- Code: Select all
#my @psoutput = `/bin/ps -f --no-headers -A`;
my @psoutput = `/bin/ps -o "%p %a" --no-headers -A`;
foreach my $line (@psoutput)
{
chomp($line);
print "|$line| \n" if ($DBX);
my @psline = split(/\/usr\/bin\/perl /,$line);
if ($psline[1] =~ /AST_manager_li/)
{
$running_listen++;
print "SEND RUNNING: |$psline[1]|\n" if ($DB);
}
}
From what I understand is that it gets the output of
- Code: Select all
/bin/ps -o "%p %a" --no-headers -A
- 1. it works on each line in the "foreach" function
2. splits "/usr/bin/perl" from the string if any, the rest of the string is stored on psline[1], a string array
3. tries to match psline[1] with "~ /AST_manager_li/"
here is the correct output on a running system: /bin/ps -o "%p %a" --no-headers -A | grep perl (credit to capernox)
My /bin/ps -o "%p %a" --no-headers -A | grep perl:
- Code: Select all
root@macpro:~# /bin/ps -o "%p %a" --no-headers -A | grep perl
1746 /usr/bin/perl /usr/share/as
1747 /usr/bin/perl /usr/share/as
1796 /usr/bin/perl /usr/share/as
1797 /usr/bin/perl /usr/share/as
1798 /usr/bin/perl /usr/share/as
1799 /usr/bin/perl /usr/share/as
1800 /usr/bin/perl /usr/share/as
2030 /usr/bin/perl /usr/share/as
60296 /usr/bin/perl /usr/share/as
75952 /usr/bin/perl /usr/share/as
75954 /usr/bin/perl /usr/share/as
75990 /usr/bin/perl /usr/share/as
75995 /usr/bin/perl /usr/share/as
76000 /usr/bin/perl /usr/share/as
76051 grep --color=auto perl
The problem: My ps binary is truncating the output and the script can not verify if the listen screen is running.
Potential cause - ps or it's linked libraries have a bug/feature not existent in previous versions. Here are my ps dependancies and versions:
... maybe it's one of these suckers
dd --verbose /usr/bin/ps
- Code: Select all
root@macpro:/usr/share/astguiclient# ldd --verbose /usr/bin/ps
linux-vdso.so.1 (0x00007ffe8c7bf000)
libproc2.so.0 => /lib/x86_64-linux-gnu/libproc2.so.0 (0x00007188cb855000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007188cb600000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007188cb520000)
/lib64/ld-linux-x86-64.so.2 (0x00007188cb8db000)
libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007188cb848000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007188cb3d8000)
liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007188cb824000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007188cb3a6000)
libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007188cb2ec000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007188cb2c7000)
Version information:
/usr/bin/ps:
libproc2.so.0 (LIBPROC_2) => /lib/x86_64-linux-gnu/libproc2.so.0
libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.33) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.38) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.32) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libproc2.so.0:
ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
libsystemd.so.0 (LIBSYSTEMD_209) => /lib/x86_64-linux-gnu/libsystemd.so.0
libc.so.6 (GLIBC_2.8) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.33) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.38) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libc.so.6:
ld-linux-x86-64.so.2 (GLIBC_2.2.5) => /lib64/ld-linux-x86-64.so.2
ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
/lib/x86_64-linux-gnu/libsystemd.so.0:
liblzma.so.5 (XZ_5.0) => /lib/x86_64-linux-gnu/liblzma.so.5
ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
libgcrypt.so.20 (GCRYPT_1.6) => /lib/x86_64-linux-gnu/libgcrypt.so.20
libc.so.6 (GLIBC_2.35) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.30) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.28) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.25) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.27) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.8) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.33) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.38) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.5) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.26) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.17) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.32) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.16) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.9) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libcap.so.2:
libc.so.6 (GLIBC_2.9) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.8) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.33) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.38) => /lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libgcrypt.so.20:
libgpg-error.so.0 (GPG_ERROR_1.0) => /lib/x86_64-linux-gnu/libgpg-error.so.0
libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.33) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.25) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.38) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/liblz4.so.1:
libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/liblzma.so.5:
libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.32) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.6) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.17) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libzstd.so.1:
libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libgpg-error.so.0:
libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.32) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.38) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
My question: How do I get my system's ps to quit truncating the output of /bin/ps -o "%p %a" --no-headers -A on Ubuntu 24.04 ?
vici SVN: 3874
Thanks a million
in before:
uncommenting #my @psoutput = `/bin/ps -f --no-headers -A`; from AST_manager_send.pl won't work with out further script modification, but this might be a hot fix, tho a bandaid. working on it