Hallo,
ich habe ein Problem mit einem Systemaufruf der mir immer wieder Meldungen reinbringt.
1 | su - sidadm -c disp+work -version |
Ausgabe:
-------------------- disp+work information -------------------- kernel release 745 kernel make variant 745_REL compiled on AIX 1 6 compiled for 64 BIT compilation mode UNICODE compile time May 23 2017 08:18:29 Wed May 16 20:44:52 2018 Loading DB library '/usr/sap/SID/SYS/exe/run/dbdb6slib.so' ... Library '/usr/sap/SID/SYS/exe/run/dbdb6slib.so' loaded Version of '/usr/sap/SID/SYS/exe/run/dbdb6slib.so' is "745.04", patchlevel (0.500) update level 0 patch number 500 source id 0.500 RKS compatibility level 0 DW_GUI compatibility level 500 --------------------- supported environment --------------------- database (SAP, table SVERS) 740 750 762 operating system
Mit der Umleitung bekomme ich das ganze ohne "Loading DB library "
1 | su - sidadm -c disp+work -version 2>/dev/null |
Wie muss ich das in Perl mit der Umleitung schreiben, damit das sauber funktioniert?
Im Moment nutze ich:
1 2 | my $disp = "disp+work" my @SapKernel_Info = `su - $SIDadm -c $disp 2>/dev/null`; |
Was mir diese Ausgabe bringt:
Wed May 16 20:58:39 2018 Loading DB library '/usr/sap/SID/SYS/exe/run/dbdb6slib.so' ... Library '/usr/sap/SID/SYS/exe/run/dbdb6slib.so' loaded Version of '/usr/sap/SID/SYS/exe/run/dbdb6slib.so' is "745.04", patchlevel (0.500) Wed May 16 20:58:39 2018 Loading DB library '/usr/sap/SID/SYS/exe/run/dbdb6slib.so' ... Library '/usr/sap/SID/SYS/exe/run/dbdb6slib.so' loaded Version of '/usr/sap/SID/SYS/exe/run/dbdb6slib.so' is "745.04", patchlevel (0.500) host : aix : 6.1.0.0 : SID : 01 : 745_REL : UNICODE : 500 host : aix : 6.1.0.0 : SID : 00 : 745_REL : UNICODE : 500