Long (extended?) display output of 'ps' command

Hi, all
If the path of a command is long, the output is being cut of from the output of 'ps -ef' command. On HPUX, there is a 'x' option from ps for extended display format to fix the problem. From the man page of 'ps' of Solaris, I don't see similar option exist. Does anyone know similar option exist for Solaris? Thanks.

Using '/usr/ucb/ps auxw' prints a wider output, truncated to a maximum of 132 characters.
Using '/usr/ucb/ps auxww' prints the full command-line arguments with no truncation (something that /usr/bin/ps cannot do). This is fetched, if permissions allow, from /proc/<pid>/as.
If the values in the columns are large enough they can collide. For example:
$ /usr/ucb/ps aux
USER PID %CPU %MEM SZ RSS TT S START TIME COMMAND
user1 3132 5.2 4.33132422084 pts/4 S Feb 16 132:26 Xvnc :1 -desktop X
user1 3153 1.2 2.93544414648 ? R Feb 16 21:45 gnome-terminal --s
user1 16865 1.0 10.87992055464 pts/18 S Mar 02 42:46 /usr/sfw/bin/../li
user1 3145 0.9 1.422216 7240 ? S Feb 16 17:37 metacity --sm-save
user1 3143 0.5 0.3 7988 1568 ? S Feb 16 12:09 gnome-smproxy --sm
user1 3159 0.4 1.425064 6996 ? S Feb 16 11:01 /usr/lib/wnck-appl
This can make both reading and postprocessing the values quite difficult.

Similar Messages

  • Sysql - use SQL queries against output of linux commands

    Hello!
    Many linux commands have table-like output. Sometimes it is better to analyze such output as a real table in relational database. I have published prototype of utility that parses output of one or several linux commands, saves it in database and allows to make SQL queries to that data. Program is written on python and uses sqlite database engine.
    sysql at AUR
    sysql at Github
    Here is why I wrote it:
    * No need to remember command syntax to format command output - just select necessary fields in SQL query
    * No need to know sed, awk, head, join and other linux commands to manipulate with output - it's all SQLite
    * Table data is stored with meaningful column name and type (int, text, float, datetime etc)
    * All power of SQL can be used to query output (JOIN, WHERE, GROUP BY etc.)
    * To support new command, output parser must be developed only once and then can be shared with community to make life easier
    * All supported commands are kept in one place as set of python files, so it is easy to find out how to customize existing parsers or create new ones
    This is my first community contribution, so kindly ask everyone to share your opinions and advices on what can be done better. Thank you!
    Examples:
    Display help and list of available commands:
    sysql
    Display output of ps command:
    sysql ps
    Query output of lsblk command:
    sysql -q "SELECT device,uuid,filesystem FROM lsblk" lsblk
    Query output of several commands:
    sysql -q "SELECT ps.pid, ps.command, ps.elapsed_time, lsof.name FROM ps JOIN lsof ON ps.pid = lsof.pid WHERE name LIKE '%LISTEN%'" ps -e --- lsof -Pni4

    I am not sure, if I will ever use it, but I do think, this is an _amazing_ idea!
    You may consider something like a global repository for output parsers accessable directly via sysql.
    Last edited by myname (2013-11-24 09:16:59)

  • Updates keep switching from duplicate to extend display

    I'm getting a little tired of this. I keep a lot of desktop shortcuts and I keep them arranged in a specific order. Only, every time Microsoft sends me automatic updates it switches me fro "duplicate" displays to "extend" displays. Which
    leads to all my shortcuts being stacked up on one side, and 45 minutes of putting everything back where it belongs.
    Thanks to the Blue Ray player, I can't just unplug the DVI cable, and I primarily use VGA so that I don't have to switch everything around when I want to use one of my other computers that don't have DVI options.  And, YES, I logged in as "Administrator"
    and changed things there.
    So, either stop changing my settings every time you force me to update, or fix the stupid software that can no longer output Blue Ray video through the VGA signal.  Don't even "try" to lie to me and say it's impossible, there was no problem
    doing it back when my card didn't have a DVI output.
    As it stands, you force me to get a DVI capable because, now that my video card has a DVI output, it is suddenly impossible to output Blue-Ray video over VGA.  Then, even though both cables go to the same monitor, Windows  7 "insists"
    that the 1366x768 DVI monitor is actually a different resolution than the 1366x768 VGA monitor.  Then when I force it to duplicate the display (so I don't have to switch my monitor back and forth just to operate normally,) it decides that I must be mistaken
    every time it updates.
    f

    So far it's happened after every update that requires a restart.  If I restart my computer without an update, it doesn't happen.  If I have an update that doesn't need to restart my computer, then I later restart my computer manually, it doesn't
    happen.
    The drivers for my display haven't been updated since I installed them.  Just went through the update history to make sure.  Checked all that were installed on 11/11/2014 (the last time this happened,) and scanned through all the rest - though
    I don't remember which specific ones required a restart or not.  Didn't see anything ATI (well AMD now,) in the list.  Didn't see anything HP (for the LCD monitor,) either.  Those usually appear under "optional" updates which don't
    install automatically anyways.
    f

  • Help please. Extended display won't work on MBP and AOC 20" 1600 x 900  60HZ monitor. Mirror display does. I've a mini dvd to vga converter cable. Should this work?

    Help please. Extended display won't work on MBP and AOC 20" 1600 x 900  60HZ monitor. Mirror display does. I've a mini dvd to vga converter cable. Should this work?

    I have the same mini display port adapter and Belkin DVI-HDMI cable (but a Panasonic 42" Plasma HDTV) so just set this up on it to see if I could duplicate your problem, unfortunately for you (but good for me) I can't.
    I connected the adapter+HDMI cable before switching the HDTV on and then powered up the MBP. It (the HDTV) came up with my background right away (it's set at Mirror not extended Desktop) and when I run System Preferences/Displays get the following. Sorry but all I can confirm is that adapter+cable combination should work ...
    Try doing a Parameter RAM reset - hold down command/option/p/r keys at start up and wait for three chimes before releasing the keys?

  • Using my Macbook Pro as an 'extended display' (2ndary monitor) to my G5

    My G5 tower looks like it has two DVI connections: one is (30+5) pins and the other is (24+5) pins.
    I have a simple ViewSonic monitor connected to this G5 using the (24+5) pins.
    I am trying to use my new Macbook Pro as a secondary monitor (extended display to the G5 cpu).
    How do I connect the (30+5) pin output from the G5 tower to the (24+5) pin monitor connection on my MacBook Pro? And will this even work? Has anyone tried this?
    Thnks

    Correct. I'm not aware of any laptop that has been designed with a DVI or VGA input to allow use of the laptop's display as a monitor for another computer.
    (I know someone else will bring this up, so I'll include the info here, but I don't recommend the following solution at all)
    The expensive and relatively low-quality (picture-wise) way to work around this would be to buy a FireWire or USB video digitizer and run your desktop's video (as an S-video signal) to the video digitizer, and use your laptop to receive and display the image.

  • Does Apple TV support wireless connection to the new MacBook Pro retina in an extended display mode?

    Does Apple TV support wireless connection to the MacBook Pro retina display in an extended display mode? What is the output resolution and is sound also transmitted across?

    SB1983, by extended display do you mean mirror?  All MBP since early 2011 support it if they are running OS X 10.8 Mountain Lion.  The resolution will depend on your Apple TV (2 Gen is 720 and 3rd Gen 1080) and wifi, it will lose some quality but I find it minimal.  It does also mirror the sound.
    Jules

  • Gnome Panel applet that shows output of system command.

    Hi all;
    Because of the recent hostile takeover of #archlinux channel by tilling WM fanatics..    I will ask here..
    Does any one know of a Gnome Panel applet that shows the output of system command of your choice?
    For people who Conky is a bit too much and they only want a simple piece of data available (like what is the current IP on ppp0 interface) like me..  this is a necessity.
    If its not in existence I would probably make one.. shouldn't take long, I also would like to hear if there is any interest.
    Thanks

    That's exactly what I was looking for!  Thank you!
    Changed code to:
    $dism = "X:\Windows\System32\Cmd.exe /c start CMD /k dism /apply-image /imagefile:D:\W7x86.wim /index:1 /applydir:C:\"
    And voila, new window opened with the live output of dism.
    new... and have a glazed over look about my eyes to prove it...

  • Default screen/display output at boot.

    Hi guys,
    Running a dual boot with Arch Linux and Windows 8 on my laptop (Asus G74sx). I'm running Syslinux as bootloader.
    When i have a video cable plugged in at boot (HDMI or VGA) the image of syslinux and login is projected on one of the extended displays even if theese aren't activated, the laptop screen is black. When i start X i can see things on my laptop screen again.
    The bios isn't displayed on the laptop screen either, but can't change anything in the Bios settings itself.
    So is there somehow I can force syslinux and tty to be displayed on the laptop screen?

    Hi
    Its definitely not a display driver issue if you see the wrong resolution in BIOS too.
    Try to set the BIOS to default settings (F9) and save the changes before accessing the BIOS.
    Furthermore try this:
    Shut down the notebook and disconnect the AC adaptor and battery.
    Leave the notebook disconnected for some time (2-3 hours). Then press power button 30 sec long. Then connect battery and AC adaptor and power up the unit.
    Check if this help.

  • Cannot read the output from windows command.

    Hello
    I have the following classes
    package cmd;
    import java.io.IOException;
    public class CMD {
        public CMD(){
            ProcessBuilder pb = new ProcessBuilder()
            .command("cmd.exe","/c","del *.*")
            .redirectErrorStream(false);
            Process p;
            try {
                p = pb.start();
                StreamGobbler errorGobbler = new StreamGobbler(p.getErrorStream(), "ERROR");
                // any output?
                StreamGobbler outputGobbler = new StreamGobbler(p.getInputStream(), "OUTPUT");
                // start gobblers
                outputGobbler.start();
                errorGobbler.start();
            } catch (IOException e) {
                // TODO Auto-generated catch block
            System.out.println("eee "+e.getMessage());;
        public static void main(String[] args) {
            System.out.println("x");
            new CMD();
            System.out.println("x");
    and
    package cmd;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    public class StreamGobbler extends Thread {
        InputStream is;
        String type;
        StreamGobbler(InputStream is, String type) {
            this.is = is;
            this.type = type;
        @Override
        public void run() {
            try {
                InputStreamReader isr = new InputStreamReader(is);
                BufferedReader br = new BufferedReader(isr);
                String line = null;
                while ((line = br.readLine()) != null)
                    System.out.println(type + "> " + line);
            catch (IOException ioe) {
                ioe.printStackTrace();
    Please note that I cannot seee the output from wndows command : del *.* and the java class execution does not finished.
    I I will replace the above command with the dir command then the output of the command is visible.
    Would you give me a hint about how to modify the above clases in order to parse the output of the del *.* ?
    Please note that the above example is important because I am developping a tool and it is mandatory for that tool to parse the output from a windows batch command.
    Best regards,

    Please note that I cannot seee the output from wndows command : del *.* and the java class execution does not finished.
    I I will replace the above command with the dir command then the output of the command is visible.
    Would you give me a hint about how to modify the above clases in order to parse the output of the del *.* ?
    No - but I will give you a hint about ProcessBuilder and how to develop software properly.
    Hint #1: Don't try to automate something that you don't know, or understand, how to do manually.
    a. Do you know how to execute 'del *.*' manually in a command window?
    b. Did you try that manually to see what happens?
    My guess is 'no'. If you had you would know that the response to a 'del *.*' command is going to be this:
    Are you sure (Y/N)?
    And your 'java class execution' doesn't finish because the 'del' command is waiting for you to answer that question.
    Hint #2: Don't try to use ProcessBuilder for an application that requires console input unless you first know how to provide that console input via your Java code.
    Your code will wait forever since it does NOT answer that question.
    Search the net and The Java Tutorials and  you can find examples of executing command line utilities. Then try those examples first and make sure that:
    1. They work for you
    2. You understand HOW they work
    Then you can modify those examples to do what you want to do.

  • Using subprocess in python3 to get output of a command

    Hi Friends. I am writing a python3 script for audacious to check the internet for album cover of the current playing song and then display it in conky. I am trying to call a command from python and get it's output:
    audtool current-song-tuple-data album
    but when i use this command in python like this:
    subprocess.check_output(["audtool", "current-song-tuple-data album"])
    i get the following error:
    Unknown command "current-song-tuple-data album".  Try "audtool help".
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/lib/python3.2/subprocess.py", line 522, in check_output
        raise CalledProcessError(retcode, cmd, output=output)
    subprocess.CalledProcessError: Command '['audtool', 'current-song-tuple-data album']' returned non-zero exit status 1
    Please , python experts on this forum, help me.

    @Pranavg1890: Please add solved to your thread title then.
    BTW: I found pexpect a good option for interacting with shell commands:
    http://sourceforge.net/projects/pexpect/
    It provides an easy way to deal with console output and react on certain patterns.

  • Problems with InDesign CC 2014 tool palettes on an extended display

    We have a Mac in our group set up with an extended display. With Indesign CC and before, we were able to move our InDesign tool palettes to the extended display, giving us a full view of our work on the main display. Now with the new upgrade to Indesign CC 2014, when using the tool palettes, the commands open on the main workspace display and the palettes will not collapse into each other unless you move them to the main display first. Can anyone offer help?

    Ask in the ID forum and provide proper technical information like what Mac, what OSX, what display.
    Mylenium

  • Help with displaying output of javac

    Hi, I got some code from this forum that helped me
    to implement buttons with Action for compiling java code. Any output or exception generated can be displayed to JTextArea.
    However, just found out the code I got hangs in cases
    when there seems to be lots of exception in source code. (i.e. Nothing displayed on JTextArea )
    I list the code below, can someone tell me what I need to do to display output in JTextArea properly??
    /* Usage
    java OutputCapture javac MyClass.java
    java OutputCapture java MyClass
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    public class OutputCapture {
    public static void main(String[] args)
    JFrame frame = new JFrame();
    JPanel panel = new JPanel();
    JTextArea tArea = new JTextArea("",8,20);
    tArea.setLineWrap(true);
    tArea.setWrapStyleWord(true);
    JScrollPane pane = new JScrollPane(tArea);
    panel.add(pane);
    frame.getContentPane().add(panel);
    frame.setSize(300,300);
    frame.setVisible(true);
    String runString = "c:\\java\\bin\\"+ args[0]+ ".exe " + args[1] + "";
    String output;
    try
    Process p = Runtime.getRuntime().exec(runString);
    Vector streams = new Vector();
    streams.addElement(p.getInputStream());
    streams.addElement(p.getErrorStream());
    BufferedReader reader = new BufferedReader(new InputStreamReader(new SequenceInputStream(streams.elements())));
    while ((output = reader.readLine()) != null)
    tArea.append(output + "\n");
    reader.close();
    catch(Exception e) { e.printStackTrace(); }
    </pre>
    * Can someone please list the code for displaying
    output of compiling/runnning app with Runtime.exe()
    command in JTextArea properly? (this is driving me
    nut)
    Thanks
    Okidoki

    Hi
    I tried your code and it still doesn't work.
    It simple hangs there now without output to
    screen. Can you be more specific? I have
    provided your code below and a class with
    bug to be compiled by your code.
    Can you show me how the output of compiling can
    be shown to screen or to a file through
    your method?
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    public class Exec {
         public Exec(String app) throws Exception {
              Process process = null;
              //final OutputStream out;
              final InputStream err, out;
              process = Runtime.getRuntime().exec(app);
              //out = process.getOutputStream();
              out = process.getInputStream();
              err = process.getErrorStream();
              Runnable r = new Runnable() {
                   public void run() {
                        Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
                        try {
                             while(true) {
                                  int i = out.available();
                                  int j = err.available();
                                  if(i > 0) {
                                       byte[] b = new byte;
                                       out.read(b);
                                       //System.err.write(b);
                                       System.err.println(b);
                                  if (j > 0) {
                                       byte[] b = new byte[j];
                                       err.read(b);
                                       //System.err.write(b);
                                       System.err.println(b);
                             } // while
                        } catch (IOException e) {
                             System.err.println(e);     
              new Thread(r).start();
              process.destroy();
         public static void main(String[] args) {
              try {
                   //String s = "c:\\JBuilder5\\jdk1.3\\bin\\javac.exe FontColorDialog.java";
                   String s = "c:\\JBuilder5\\jdk1.3\\bin\\javac.exe test2.java";
                   new Exec(s);
              } catch (Exception e) {
                   System.err.println(e);
    //==================================
    // Testing class
    //import javax.swing.*; // Uncommented here on purpose
    public class test2 {
         public static void main( String args[] ) {
              System.out.println("Hello World!");
              JTextField jtf = new JTextField();
              System.out.println("Font: " + jtf.getFont().toString() );
    Thanks

  • How to disable the extended display mode on iMac?

    how to disable the extended display mode on imac

    I downloaded one of the PDF form (IMM5490) from cic.gc.ca and saved it on my computer after filling it up. Later on the following message popped up when I tried to open the form again later to in order to make some changes.
    "This document enabled extended features in Adobe Reader. The document has been changed since it was created and use of extended features is no longer available. Please contact the author for the original version of this document"
    Your help in this regard will be greatly appreciated, since, I have already filled the form with a lot of information and I will not be able to edit the form with additional information unless I disable the extended features ( I guess).

  • T4-1 - No X display output

    Brand new server T4-1 using the built-in VGA device.
    Loaded Solaris SPARC 10 u10, patched to 147440-27
    Changed eeprom / OBP to use screen & keyboard for output.
    Text displays just fine, but no X11 display output (GUI) on the Sun 19" display I have connected for now. Once it reaches it's final location it will be racked, & hooked to a KVM.
    The error on the screen says check the /var/dt/Xerror log. From the log file:
    The loadable module for the display device SUNWast is not installed.
    Fatal server error:
    InitOutput: Error loading module for /dev/fb
    A pkginfo -l SUNWast shows there is a package for Automated Security Enhancement Tools loaded on the system. Version 11.10.0,REV=2005.01.21.15.53
    I am assuming this is a "driver problem" of some sort. I have searched for a problem resolution with limited results, one stating that relinking the /dev/fb would work, but it didn't. No packages could be found looking for SUNWast, but the MOS interface is notoriously bad for finding what you are looking for.
    What am I missing here? Need to resolve ASAP.

    rukbat wrote:
    Moderator Comment:
    user13624468 wrote:
    Need to resolve ASAP.These forums are for end-user inquiries, NOT a way to get to Oracle Technical Support.
    Your time pressures are your issue and not anyone else's.
    If you truly have a critical business need for speedy investigation of some problem, then use your service contract and/or system warranty credentials to log a support request (SR).
    https://support.oracle.com
    Expecting the user community to be at your beck-and-call is poor etiquette at best.Wow, someone is a bit thin-skinned this morning. You mistake a time sensitive REQUEST, for a commandment. Have you ever tried to get help through the MOS interface. I am thinking maybe someone else has had these issues, and can answer faster (and probably more accurate) than the SR going into the corporate cog of out-sourced support.
    And you are correct that this is "my problem", so if you don't have anything useful to add kindly turn your flame off.

  • T520 Display Output

    We're currently looking for a new Demonstration Laptop, and the T520 and W520 look like being contenders. Ok they're not as portable as some, but that isn't the main factor for us. Our primary considerations are performance and Display Output.
    We require a machine that is capable of outputting at SXGA (1280x1024), which basically limits us to higher-end displays. Could anyone confirm if this setting is available on the T520/W520 1920x1080?
    Thanks in advance
    Solved!
    Go to Solution.

    I don't suppose the Extend option is a viable option? PowerPoint has a presentation mode where it presents you with your slide + notes on the laptop screen while the projector is all slide.
    W520: i7-2720QM, Q2000M at 1080/688/1376, 21GB RAM, 500GB + 750GB HDD, FHD screen
    X61T: L7500, 3GB RAM, 500GB HDD, XGA screen, Ultrabase
    Y3P: 5Y70, 8GB RAM, 256GB SSD, QHD+ screen

Maybe you are looking for

  • Photoshop CC 2014 - color panel resizing by itself?

    Hello, I am wondering if anyone else has reported (or even experienced) the new color panel in Photoshop CC 2014 resizing itself when maximizing and then restoring the Photoshop CC 20114 application frame? Here are some images to illustrate the issue

  • Help needed cpu 0 caller panic

    Hi everyone, I tried to update the iTunes on my macbook pro last night to the 11.1 version and then there was an error with my update. the next time i started my laptop, it just says: panic(cpu 0 caller 0xffffff8009459241): "Unable to find driver for

  • Error in a/c assiginment

    Hi, while doing P.O in ME21n i am getting this error. Account assignment mandatory for material VST1000 (enter acc. ***. cat.) Message no. ME062 Diagnosis There is no provision for value-based inventory management for this material type in this plant

  • STO(MM) get commitment on a Sales order forcasting !

    Dear friends ! A Sales order get a commitment on a Sales forcasting ! But we need to set STO to make the same commitment! Does anyone has already seen this scenario ? best regards, Ale

  • SQL 4.7 Installation Error CJS-00084  SQL Statement or Script failed

    Dear SAP Gurus, pl do let me know hoe to resolve this error....... """CJS-00084  SQL Statement or Script failed""" my ora_sql_results file is like that.. =========================================== 2008-10-25, 16:14:44 SAPINST ORACLE start logging fo