Get name of process associated with PID

The subject is the question -- I have the PID(s). Either I'm overlooking something or this is far more difficult than I expected (would be happy to hear differently). Do shell script routine would be fine.

Yesterday I assigned some credits to the responses to my post, without comment. For anyone actually interested, I do have some comments.
In terms of the way I initially presented my question, Camelot's response was most on target. I said I had a PID and wanted to get the related process name, and he pointed me at "lsof PID" (with a length enhancement). Typically, that gave a result like "Default" whereas the full name is actually "Default Folder X" -- a result of calling for the first word (only) in the COMMAND column of the lsof result.
Niel's responses covered some ground that I had explored and given up on.
But in fact I had actually gotten PID's from "lsof /", so all this seemed pretty circular; it seemed silly not to figure out how to get a complete process name from lsof / in the first place. To that end, Nils C. Anderson of the UNIX forum pointed me to "lsof -Fc /" as a way of getting the complete COMMAND column of lsof /. The result includes a couple alpha identifiers and some PID info that can be edited out, and what's worked best for me is: set COMlist to do shell script "lsof -Fc / | sed -e 's/^p.*//' -e 's/c//'" -- a fast one liner.
There remains one issue (see below), but this approach has provided the best process name list yet, at least for open files.
The remaining issue is this: a small but significant number of open files return the COMMAND in the form (file name)\xxxxxxxx. If I want to compare that to a list of actual file names, somehow I've got to get rid of the "\xxxxxxxxx" portion of the COMMAND, but (maybe I'm blind) the escape seems to defy attempts at doing that. E.g., do shell script "echo " & (COMMAND)&" | sed 's/\xxxxxxxxx//' returns an error, and I haven't found a way to add the second escape AS is looking for. If I should do a new post on this specific issue, tell me that.

Similar Messages

  • Getting path to application associated with file type

    Hello,
    I'm looking for a platform-independent way to get path to application associated with given file type. Desktop API introduced in JSE 1.6 seems to do this, but it only lanuches the app.
    Any suggestions will be apprecieted

    Okay then, how can I open the file in it's associated
    application AND get the Process object of app's
    instance?If it doesn't bother you that the app will only work on windoze, then you can use the shell "start" command on the file.
    Process proc = Runtime.getRuntime().exec(new String[]{"cmd", "/C","start",filePath});However waitFor() will only wait for the process to be launched, not completed. Since your program doesn't know what Windoze will choose to launch, this makes sense.

  • Removing imovie name watermark/name in the association with imovie credits

    How do I get rid of the imovie name watermark/name in the association with imovie in the credits?
    My client don't want to have the imovie name in the credits!

    First right/click on the trailer name in the Project Library, and select DUPLICATE. (This will give you a copy of the trailer in case you need to edit it again.)
    Then for your trailer,
    1. Go to: File > Convert to Project
    2. Select the credits title at the end of your project and enter your own text.

  • Cannot delete a sub-process associated with a role

    Hello I have a problem.
    I have configured the ERM module in SAP GRC AC 5.3. I have added the roles.
    Now they have migrated the machine with all the data.
    I want to delete an business process & sub-process. It says that I have a role linked with. I delete the role.
    When I try un unlink the bussiness process from the sub-process it says "Cannot delete a sub-process associated with a role".
    The role is deleted.
    How can I delete this 2 elements from the ERM?
    Please help me.
    Best Regards.
    Pablo Mortera.

    Hi:
    I ran into this as well.
    Under the device information of the CSF/softphone, there is a Primary Phone field that is pointing to the mac address of the physical phone for deskphone mode. If you change this to you will be able to remove the record successfully.
    You need to have the enterprise parameter set correctly as mentioned already and when you are on the phone configuration page, and go to dependancy records, you will see the dependancy record show "phone" - click on that and it will bring you to the CSF/softphone page to make the change.
    HTH
    John

  • How can I change the name of devices associated with my Apple ID in iTunes?

    We have 3 iPads and 4 iPhones in our family.  All of the iPads show up on the list of devices associated with my Apple ID as simply "iPad".  All of the iPhones show up simply as "iPhone", even though each device has a distinct name on the device itself (ie. Mark's iPhone).  How can I get the distinct name to show up on the list of devices so I can keep the list updated as we add or remove devices from our collection?

    Not it it's an @icloud.com, @me.com or @mac.com address.  In that case your choices are to either create an email alias within the existing account, which delivers email to your existing iCloud inbox (see http://help.apple.com/icloud/#/mm6b1a490a), or create a new iCoud account.  Note: alias addresses are permanently tied to the account that you create them in; they cannot be used to create a new iCloud account or be moved to a different account in the future.

  • How can I remove my name from being associated with the GB file I export?

    I am using Garage Band '11, 6.0.5.
    I am editing an audio recording for a friend.
    When I exported the edited recording, it had my name associated with the file as the artist, album, etc.
    I searched and found "My info" (in "Preferences") and deleted my information from ALL name, album, artist fields, but it still exported the file with my name as the artist (but it did not list it as from my album this time)?
    Does anyone know how/where/what I need to do to remove all references of my name associated with this file I'm editing?
    And also, can I change who is associated with a GB file, from file to file (i.e. if editing my audio, use my name & info, if editing for a friend or colleague, theirs?  or is the name associated with my GB account universally embedded into every file, no matter if I want it to be mine or not)?
    Thank you for your support!
    Joe

    When I exported the edited recording, it had my name associated with the file as the artist, album, etc.
    The problem is, that this information is stored with the GarageBand project, when you first create the project.  You have to edit the Preferences, before you create the project.
    If the project already exists, you can change this option by turning the project into a podcast. Add a Podcast track (Track menu, Show Podcast Track), select the podcast track, and open the Info panel. Then edit the artist field in the Info panel, before you save the song to disk.
    (added: I saw the workaround with the Podcast track first in a post by Edgar).

  • Standard FM to get the Serial Numbers associated with the PO

    Hi,
    I'm using the Standard FM "BAPI_PO_GETDETAIL1" to get the details of the PO which I have created. The FM is returning the details such as PO HISTORY, POITEM, POHEADER etc. I want the serial numbers associated with the PO.
    Please help me to get the serial numbers which are issued to the PO since the material assigned to the PO is serialised material. Another Standard FM "BAPI_PO_GETDETAIL" also I have tried but there is no serial number collection in that FM.
    Thanks in Advance,
    Mohan.

    These function modules will not return you the serial number. May be you can use following logic.
    You can use table ser03 where in you wll input material document number and find out obknr. Pass this obknr to objk table and find out seril number.
    And to find the material document number for the relevant purchase order number you can use table EKBE.
    So for EKBe-BEWTYP= E and EBELN= purchase order find EKBE-MBLNR(belnr).
    The material document number and year  found above pass it to SER03-MBLNR and SEr03-mjahr and find SEr03-obknr.
    The obknr number found above pass it to OBJK and find serila numbers..
    Regards
    Sangeeta

  • MDX to get last date MEMBER associated with a time LEVEL

    Hi there,
    I need to come up with a MDX calculation in my cube that takes an average 90 days forward from the last date member associated with whatever time level is being viewed in a time hierarchy.  Is this something anyone could help me with?  I can come
    up with code that is specific to a level (Year, Month, Week) but not one that is dynamic.
    Best,
    D

    I don't know exactly what you want from me.  I have a Time dimension with Year, Semester, Quarter, Month and Date.  I want to be able to get to the last date associated with a time member. So, for example, I would want to derive like this...
    October 31, 2014 would get to October 31, 2014
    October 2014 would get me to October 31, 2014
    Quarter 3 would get to to September 30, 2014
    Semester 2, 2014 would get me to December 31, 2014
    2014 would get me to  December 31, 2014

  • How do I get two credit cards associated with my apple account?

    Is there a way to associate two credit cards with one apple account?  I have a work ipad that is associated with my corporate card but would like to download some movies and such for personal use and would like to use my personal credit card.  If I can't do that, can I have two apple accounts and use them for the same device?

    Sorry but no; it's one credit card at a time. If you want to use two cards in a single account, you will have to change card information in your account every time you switch.
    But yes, you can have two different iTunes Store accounts and use content from both on your iPad and/or computers without problems.
    Regards.
    By the way, this forum is for questions about the Communities themselves. You'll normally be more likely to get a quick and helpful answer if you post in the  forum dedicated for your product or service.

  • How to find PG.xml file name and path associated with a FUNCTION

    Hi,
    I am having a function:IRC_VIS_HOME_PAGE with Web HTML value as below:
    OA.jsp?akRegionCode=IRC_VIS_HOME_PAGE&akRegionApplicationId=800&OAPB=IRC_BRAND
    How to find PG.xml file name and path assoicated with above funtion.
    Thanks,
    ashok

    Ashok,
    Function IRC_VIS_HOME_PAGE will have 2 parameter defined for it which are OASF and OAHP where
    OASF=<SelectedFunctionName> - this tells the Framework to select this function in the given "Home Page" menu context.
    OAHP=<HomePageMenuName> - this is used ONLY with the OASF parameter, and it is used to establish the current menu context. It should point to a "Home Page" menu.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • I need to know if there is a user name and password associated with accessing a certain website.

    I'm not sure if at one time there was a username and password given so that I automatically could access a site. The site is the home page for my department on the intranet of the company I work for, and they've activated a new vpn. If I use Safari, after activating the vpn opening Safari, it asks me for a user name and password for some proxy server and from there on out I can navegate the external web or the company intranet. Using Firefox, I do not get prompted for a user name and password but I cannot access my homepage yahoo.com or any public website; I can, however access my company's intranet. The IT guy says there must be some user name & pw to access the site that I've previously asked Firefox to memorize but which I can't see. I don't think so but I can't figure out where to find the list of sites that Firefox has memorized passwords for.

    You ca n look in the Password Manager.
    *Firefox > Preferences > Security: Passwords: "Saved Passwords" > "Show Passwords"
    *https://support.mozilla.com/kb/make-firefox-remember-usernames-and-passwords

  • Firefox crashes getting more frequent - maybe associated with Symantec PGP?

    In January Firefox crashed 6 times. On 1/22 I did a full reinstall of Firefox. Did not crash again until 2/25 but then crashed 3 times in 4 days. In March has crashed 5 times in first 12 days. Don't know if crash report is simply blocked from occurring while my computer is locked, but most of the crash reports seem to be at whatever time I arrive in the morning and do the first unlock of the day. But not every day! This computer has full drive encryption with Symantec PGP. Maybe when locked, Firefox has problems? But why not every time it is locked? In the evenings I do the Windows locking but do not log off. The open pages vary.
    Latest crash report is bp-7dee8df1-e410-4fb7-95ed-3bf252140312
    I have disabled all of my add-ins.

    '''''LAST RESORT ! ! '''''
    ''''' [https://support.mozilla.org/en-US/kb/reset-firefox-easily-fix-most-problems Reset Firefox]'''''
    ======================================
    Sometimes a problem with Firefox may be a result of malware installed on your computer, that you may not be aware of.
    You can try these free programs to scan for malware, which work with your existing antivirus software:
    * [http://www.microsoft.com/security/scanner/default.aspx Microsoft Safety Scanner]
    * [http://www.malwarebytes.org/products/malwarebytes_free/ MalwareBytes' Anti-Malware]
    * [http://support.kaspersky.com/faq/?qid=208283363 TDSSKiller - AntiRootkit Utility]
    * [http://www.surfright.nl/en/hitmanpro/ Hitman Pro]
    * [http://www.eset.com/us/online-scanner/ ESET Online Scanner]
    [http://windows.microsoft.com/MSE Microsoft Security Essentials] is a good permanent antivirus for Windows 7/Vista/XP if you don't already have one.
    Further information can be found in the [[Troubleshoot Firefox issues caused by malware]] article.
    Did this fix your problems? Please report back to us!

  • Color (how do I find the "name or number" associated with a color

    I am asking someone to help me make a Photoshop copy of the presentation that I have built in Keynote. He asked me for the color "alphanumeric" related to the colors I have used in my presentation to make sure that it perfectly matches but I can't seem to find that information. Please let me know how I can find it...
    Thank you in advance!
    - Ian

    I am asking someone to help me make a Photoshop copy of the presentation that I have built in Keynote. He asked me for the color "alphanumeric" related to the colors I have used in my presentation to make sure that it perfectly matches but I can't seem to find that information. Please let me know how I can find it...
    Briefly, if you interchange a bitmap format such as TIFF or JPEG, an ICC MNTR Monitor profile will be embedded by the application exporting the bitmap. The application opening the bitmap will use that ICC MNTR Monitor profile to construct a ColorWorld that matches to the colour space of the digital graphic device used for instantiating / imaging / rendering / consuming that bitmap, most often the ICC MNTR Monitor profile for the current condition of the colour display.
    If you interchange a page description such as PDF, then the same thing happens except that a page description is object-oriented and each object in the page description can be in its own colour model and in its own colour management model. PDF is a modification of PostScript languag level 2 which means that it supports deviceColour and calibratedColour (PostScript's own obsolete colour management system). PDF 1.3 and higher supports ICCBased colour.
    So, the ICC MNTR Monitor profile embedded in your TIFF or JPEG, or embedded as ICCBased in your PDF, defines the COLOURS that the COLOURANTS in you object should form on other colour devices when the importing application creates a ColourWorld, whether using its own ICC API or an operating system ICC API. There is no such thing as deviceColour any more, that is, colourant combinations do not define colours. You need either a CIELa*b D50 2 degree standard observer measurement or you need an ICC device profile (preferably linearised MNTR Monitor with data sapce RGB) or non-device profile (NMCL Named Color, SPAC Colour Space or ABST Abstract).
    Similarly, I am not sending you glyphs in this post. I am sending you characters in this post. You system will show you the glyphs by looking for an SFNT Spline Font file whose CMAP Character Map can image the characters I am sending you. And if I send you characters not in the CMAP Character Map of one SFNT, the system will search its database of SFNT's for one which has a CMAP that will draw a default glyph design for that incoming character code.
    Neither the drawing model for ICC imaging nor the drawing model for Unicode imaging works in any way as you assume -:).
    /hh

  • How do I get the session Id associated with a user id rather than using the Servlet request on the iplanet portal server

     

    In com.iplanet.portalserver.session.Session class use the method given below,
    public SessionID getID()--->Returns the session ID
    If u need to get clientID then use the method given below,
    public java.lang.String getClientID()- Returns the client ID in this session

  • Standard FM to get the Serial Numbers associated with the STO

    Hi,
    I want to get the list of serial numbers which are issued against the STO (serialised material assigned to an STO) and the list of serial number for which the receipts has been done. I want a standard FM to get all these details of an STO.
    I tried the standard FM, "BAPI_PO_GETDETAIL1" and "BAPI_PO_GETDETAIL". These standard FM doesn't retured the serial number collection. Please tell me which standard FM will return the serial numbers and the receipts list for the STO.
    Thanks in Advance,
    Mohan.

    HI
    Try FM GET_SERNOS_OF_DOCUMENT
    Hope help you.

Maybe you are looking for

  • How can I turn off Voiceover on iPad air 2?

    My iPad Air 2 (OS 8.1.3 ) will not allow me to turn off the Voiceover feature in Accessibility. When I tap the toggle button it slides to off position and then turns itself back on immediately. I have tried a settings reset and it stayed selected. Th

  • Error while create iview in 6.2

    Dear EP friends I am getting below error while try to create the iview programmatically. Error:javax.naming.NoInitialContextException: java.lang.ClassNotFoundException: com.sapportals.portal.pcd.gl.PcdInitialContextFactory [Root exception is java.lan

  • Mobility groups with multicast - 7.4.100.60

    Hello all, I am not sure if this is a bug, but here we go. I configured 2 controllers in a mobility group using multicast signalling. I expect that from the moment i enable multicast, the controller joins this group AND STAYS IN THIS GROUP so he will

  • On Demand - New Extension

    Hi, Is there any documentation available detailing out the procedure that should be followed to deploy an extension on E Business On Demand. If there is any special consideration made or would be similar to what is followed in on premise environment.

  • Vanishing emails using mail.app

    I'm having a weird problem with my iPhone 4 - three times out of four, it will completely fail to send a mail message. This happens with both my Gmail account and work email, and I've triple checked the settings on both and they're definitely correct