Skip to main content
PEDRO SANTOS
New Participant
Jun 13, 2025 2:32 PM UTC

U2-Python as a Phantom in UniData/AIX

I have U2PY application in my UniData environment. 

It is running on AIX.

How can I deploy to run as a Phantom in the background?

I need the U2-Python application to listen to incoming data on a TCP/IP port.



------------------------------
Pedro Santos
API | U2PY | UniData Developer

------------------------------

    1 reply

    John Jenkins
    Participating Frequently
    Jun 15, 2025 8:09 AM UTC

    I have U2PY application in my UniData environment. 

    It is running on AIX.

    How can I deploy to run as a Phantom in the background?

    I need the U2-Python application to listen to incoming data on a TCP/IP port.



    ------------------------------
    Pedro Santos
    API | U2PY | UniData Developer

    ------------------------------

    Pedro,

    While any non-interactibive process initiated from a UniVerse shell can be started as a PHANTOM or iPHANTOM, if you want to start a process from UNIX then typically you would use the & symbol to post a command to background from a shell. e.g.

    whoami&

    If you want to monitor the output you would use redirects to send the output to files for stdout and stderr - e.g.

    whomi 1>process_out 2>process.err&

    Additionally if you want the process to continue running after you log out then use either disown at any rime or nohup when the job is launched - e.g.

    nohup whomi 1>process_out 2>process.err&

    or

    disown %1

    You might also want to look at the jobs and at commands.

    As a caution - any PHANTOM job that uses the UniVerse socket functionaity becomes an iPHANTOM and takes a UniVerse license. I haven't tried the indirect method of having a UniVerse PHANTOM process call Python to perform a socket function to see whether it does the same in practise, though in theory ANY interactive funstionality invoked froma PHANTOM should account for a license - on paper if not physicslly.

    I should mention that UniVerse has it's own socket functionality. The only time I found that I needed to 'step out' for socket functionality was when I was writing real-time comms. applications where real-time rapid processing and turnaround at the byte level and connection state change was absolutely essential and every microsecond counted. On those occasions I was using C as Python (even if it were available at the time) would have been too slow and not all the socket functionality I was using is implemented in even  the current Python libtatoes.. .

    Hoping this helps

    JJ



    ------------------------------
    John Jenkins
    Thame, Oxfordshire
    ------------------------------

    JJ