How do i determine what processes have a lock on a file?

hi-
i want to replicate the functionality of a program like:
http://www.codeguru.com/Cpp/W-P/dll/article.php/c3641/
in java, without having to use native code/JNI.
the closest method i could find was:
http://java.sun.com/j2se/1.5.0/docs/api/java/nio/channels/FileChannel.html#tryLock(long,%20long,%20boolean)
however, FileChannel#tryLock doesn't identify what processes have a lock on the file.
thanks,
augusto.

I don't think you can get hold of the locking process id using only Java.
Kaj

Similar Messages

  • How do I determine what processes are running?

    I'd like to determine what processes are running on my iMac running Mtn Lion.  Is there an analog to Windows Task Manager?

    Open the Activity Monitor in the /Applications/Utilities/ folder.
    (76553)

  • How can I determine what machines have Offline Sync running and are using it

    Hi everyone,
    I am working on a project where a Windows feature was rolled out but we do not know to whom exactly?
    I need to run a script that will tell me for all the machines/PCs in our estates which ones are actually using the Offline Files/Sync Center in Windows 7.
    Is there a way to do this via Reporting? I'm actually using SCCM 2012 SP1 but there was no option for this in the drop-down.
    If anyone has any samples or scripts - that I could utilise then I would appreciate this.
    Thanks

    Yes, I know this is an old post, but I’m trying to clean them up. Did you solve this problem, if so what was the solution?
    A Quick Bing search revealed several scripts that will allow you to determine offline data. I would start with one of those then, write the results to WMI. Once that is done CM12 can inventory the results and you can then create a report in this data.
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ

  • How can i determine what vectors have been used for TTLTRIG0?

    hi! I'm programing the application in vxworks OS.The application can obtain interrupt from TTLTRIG0-TTLTRIG8. Wish to receive your help! thank you very much!
    regard you!

    Hi Zhongzheng,
    I'm not quite sure what you mean by vectors. Are vectors specific to VXWorks? Are you trying to figure out which instrument is causing an interrupt or asserting the trigger? Are you trying to determine which trigger line has been asserted? Please clarify your question and provide more details, I'll try to find an answer for you.
    Regards,
    David Shatila
    Applications Engineer
    National Instruments

  • How can I determine what computers are authorized on my iTunes account?

    How can I determine what computers have been authorized on my iTunes account?  I've reached my limit and now I'd like to deauthorize one computer.
    Thanks,
    Jerry

    There is no list.
    You can only deauthorize a single computer from that computer.
    If you do not have access to the computers, then you would have to deauthorize all.

  • How do I determine whether I have PCI Express v1.1 or v2.0?

    This article in Mac Fixit states that computers with PCI Express v1.1 slots will NOT be able to take full advantage of OpenCL in Snow Leopard:
    http://www.macfixit.com/article.php?story=20090612121357227
    ... In terms of PCI Express, My Mac Pro is on the cusp. PCI 2.0 was announced in January 2007 and presumably made it's way onto the assembly line a few months after that. I bought my refurbished Mac Pro in June 2007. I can't determine in the System Profiler if I have PCIv1.1 or v2.0. Does anyone know how to find out? MacTracker and machistory.com haven't answered the question. It seems some of the MacPro1,1 models shipped with v1.1 and some with v2.0. How do I determine what I have? Thanks for your help!
    SPECS FROM MY SYSTEM PROFILER (SERIAL RM727......)
    GRAPHICS/DISPLAYS
    NVIDIA GeForce 7300 GT
    Chipset Model: NVIDIA GeForce 7300 GT
    Type: Display
    Bus: PCIe
    Slot: Slot-1
    PCIe Lane Width: x16
    VRAM (Total): 256 MB
    Vendor: NVIDIA (0x10de)
    Device ID: 0x0393
    Revision ID: 0x00a1
    ROM Revision: 3008
    PCI CARDS
    NVIDIA GeForce 7300 GT
    Name: NVDA,Display-B
    Type: display
    Bus: PCI
    Slot: Slot-1
    Vendor ID: 0x10de
    Device ID: 0x0393
    Subsystem Vendor ID: 0x0000
    Subsystem ID: 0x0010
    ROM Revision: 3008
    Revision ID: 0x00a1
    Link Width: x16

    How do I determine whether I have PCI Express v1.1 or v2.0?
    Hi,
    Open Apple System Profiler (About this Mac:More info) and look at the Hardware: Model Identifier. If it says Mac Pro 1,1 or Mac Pro 2,1 you have PCIe v1.1 slots.
    http://www.amug.org/amug-web/html/amug/reviews/articles/intel/macpro/
    If it says Mac Pro 3,1 you have PCIe v1.1 in slots 3 and 4 and PCIe v2.0 in slots 1 and 2.
    http://www.amug.org/amug-web/html/amug/reviews/articles/intel/macpro-2008/
    If it says Mac Pro 4,1 you have PCIe v2.0 in all four slots.
    http://www.amug.org/amug-web/html/amug/reviews/articles/intel/macpro-2009/
    Hope that helps!

  • When I upgraded from v4 to v5 my bookmarks was lost. I do have the one that is in the firefox toolbar. Apparently I had a bookmarks add-on. V5 changed my browser how can I determine what the program was and if the bookmarks are still there?

    When I upgraded from v4 to v5 my bookmarks was lost. I do have the one that is in the firefox toolbar. Apparently I had a bookmarks add-on. V5 changed my browser how can I determine what the program was and if the bookmarks are still there?

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Websites remembering you and automatically log you in is stored in a cookie.
    *Create an allow Cookie Exception to keep such a cookie, especially for secure websites and if cookies expire when Firefox is closed.
    *Tools > Options > Privacy > Cookies: Exceptions
    In case you are using "Clear history when Firefox closes":
    *do not clear Cookies
    *do not clear Site Preferences
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/Clear+Recent+History
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords.
    Clearing cookies will remove all specified (selected) cookies including cookies that have an allow exception and cookies from plugins.

  • HT1454 I have a speaker with I phone 30 pin dock, it use to work fine but i am not getting error saying accessory not supported,how i can determine what could be the problem

    I have a speaker with I phone 30 pin dock, it use to work fine but i am not getting error saying accessory not supported,how i can determine what could be the problem
    i am getting the same error with my rf transmitter that i use in my car

    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Did this start happening after an iOS update? Sometimes an iOS update will break compatibility.
    Sometimes this works:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                             
    - Restore to factory settings/new iOS device.

  • How Do I Determine What WUDFHost.exe is Doing and What It's Associated With?

    Since around the time of the installation of Win 8.1 Update 1 I've had a couple of new WUDFHost.exe processes that run all the time.  Today I saw one of them accessing data on a backup volume, which I assume was some kind of maintenance
    activity - but I'm not sure.
    My question is this:
    How can I determine what these processes are doing, why they're here, and what they're associated with (i.e., what feature or device has caused them to be running).  I don't suspect them of causing a specific problem - my system's running fine
    - but I want to know why they're running.
    Process Explorer shows them to have been started by these two command lines:
    "C:\Windows\System32\WUDFHost.exe" -HostGUID:{193a1820-xxxx-xxxx-xxxx-be817523f6aa} -IoEventPortName:HostProcess-ae18c507-xxxx-xxxx-xxxx-ce7a84b73fb2 -SystemEventPortName:HostProcess-76f2d2b0-xxxx-xxxx-xxxx-25de41b0af65 -IoCancelEventPortName:HostProcess-52988628-xxxx-xxxx-xxxx-54018fc05bec
    -NonStateChangingEventPortName:HostProcess-c981e37e-xxxx-xxxx-xxxx-a8bd344c5791 -ServiceSID:S-1-5-80-dddddddddd-dddddddddd-dddddddddd-dddddddddd-ddddddddd -LifetimeId:8472fac1-xxxx-xxxx-xxxx-680353bbbc7f -DeviceGroupId:WpdFsGroup
    "C:\Windows\System32\WUDFHost.exe" -HostGUID:{193a1820-xxxx-xxxx-xxxx-be817523f6aa} -IoEventPortName:HostProcess-af2e6f5b-xxxx-xxxx-xxxx-39a9cc13f6d4 -SystemEventPortName:HostProcess-45e89330-xxxx-xxxx-xxxx-9e76811e37aa -IoCancelEventPortName:HostProcess-3007f65c-xxxx-xxxx-xxxx-c6cdd5617944
    -NonStateChangingEventPortName:HostProcess-efca4373-xxxx-xxxx-xxxx-cfc06fd83dee -ServiceSID:S-1-5-80-dddddddddd-dddddddddd-dddddddddd-dddddddddd-ddddddddd -LifetimeId:f4aa6ef0-xxxx-xxxx-xxxx-d16f4eefddb2 -DeviceGroupId:WudfDefaultDevicePool
    As you can see, their function isn't obvious from what's showing.
    What tools can I used to delve further into what these are and why they're here?
    Thanks for any help or wisdom you can offer.
    -Noel
    Detailed how-to in my eBooks:  
    Configure The Windows 7 "To Work" Options
    Configure The Windows 8 "To Work" Options

    seems to me that you're about to dive down a rabbit hole for this one..
    http://en.wikipedia.org/wiki/User_Mode_Driver_Framework
    http://msdn.microsoft.com/en-us/Library/Windows/Hardware/ff557565(v=vs.85).aspx
    http://blogs.msdn.com/b/iliast/archive/2009/06/09/umdf-debugging-videos.aspx
    might need to ask more in the driver dev forums?
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • How can I determine what computers are home sharing??

    How can I determine what computers are home sharing??

    Launch iTunes on the computers you're interested in. Check in the "Advanced" menu.
    If "Turn on Home Sharing" is listed as an option, the iTunes library that you have open is not Home Sharing.
    If "Turn off Home Sharing ([accountname]) is listed as an option, the iTunes library that you have open is Home Sharing.

  • How can I determine what is the minimum SCN number I need to restore up to.

    Say if I have a full database backup, I know I have file inconsistency, but I want to know what is the minimum time or SCN number a need to roll forward to in order to be able to open the database?
    For example: I do a database restore.
    restore database ;
    RMAN> sql 'alter database open read only';
    sql statement: alter database open read only
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of sql command on default channel at 03/16/2009 15:00:04
    RMAN-11003: failure during parse/execution of SQL statement: alter database open read only
    ORA-16004: backup database requires recovery
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: '/u01/oradata/p1/system01.dbf'
    I need need to apply archive log files. All references I find for ORA-00194 state the solution is to "apply more logs until the file is consistent " But "HOW MANY LOGS", or more apporaite up to what time or SCN? How does one determine what TIME or SCN is required to get all file consistent?
    I thought this query might provide the answer, but it doesn't
    select max(checkpoint_change#)
    from v$datafile_header
    MAX(CHECKPOINT_CHANGE#)
    7985876903
    --It applies a bit more redo, but not enough to make my datafiles consistent.
    recover database until SCN=7985876903 ;
    Starting recover at 03/16/09 15:04:54
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    using channel ORA_DISK_3
    using channel ORA_DISK_4
    using channel ORA_DISK_5
    using channel ORA_DISK_6
    using channel ORA_DISK_7
    using channel ORA_DISK_8
    starting media recovery
    channel ORA_DISK_1: starting archive log restore to default destination
    channel ORA_DISK_1: restoring archive log
    archive log thread=1 sequence=18436
    channel ORA_DISK_1: reading from backup piece /temp-oracle/backup/hot/p1/20090315/hourly.arch_P1_47353_681538638_1
    channel ORA_DISK_1: restored backup piece 1
    piece handle=/temp-oracle/backup/hot/p1/20090315/hourly.arch_P1_47353_681538638_1 tag=TAG20090315T041716
    channel ORA_DISK_1: restore complete, elapsed time: 00:02:26
    archive log filename=/u01/app/oracle/flash_recovery_area/P1/archivelog/2009_03_16/o1_mf_1_18436_4vxd81yc_.arc thread=1 se quence=18436
    Oracle Error:
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: '/u01/oradata/p1/system01.dbf'
    I've discover I need to apply archive logs until this query reports all datafiles as FUZZY=NO , but this only works by guessing at some time periord to roll forward to, then checking the FUZZY column, and try again. Is there a way to know, I have to roll forward to a specific SNC in order for all my datafiles to be consistent?
    select file#
         , status
         , checkpoint_change#
         , checkpoint_time
         , FUZZY
         , RECOVER
    ,LAST_DEALLOC_SCN
    from v$datafile_header
    order by checkpoint_time
    Thanks,
    Jason

    The minimum point in time is the time when the last backup piece for datafiles in that backup was completed.
    Your alert.log should show the redo log sequence number at that time.
    You can query V$ARCHIVED_LOG and get the FIRST_CHANGE# of the first archivedlog generated after that backup piece completed.
    A
    LIST BACKUP;in RMAN should also show you the SCNs at the time of the backups.
    You can also query SCN_TO_TIMESTAMP -- eg
    select timestamp_to_scn(to_timestamp('15-MAR-09 09:24:01','DD-MON-RR HH24:MI:SS')) from dual;will return an approximation of the SCN.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com
    Edited by: Hemant K Chitale on Mar 17, 2009 9:41 AM
    added the LIST BACKUP command from RMAN.

  • How do you determine what shows are in free video on demand?

    How do you determine what to include in the free on-demand shows?  The Mentalist was always there before but is no longer.  This is especially important for shows like the Mentalist and The Good Wife which come on Sunday nights after sports events.  Even if I set my DVR to record 60 minutes over it doesn't always catch the entire episode.  Would also like to see Person of Interest  there.   And last but not least, you should have a way for people to access netflix or other services from your service.  

    If you go to BROWSE then the FREE folder you will find that everything in there is free viewing. If you go elsewhere and try to watch a paid show, you will get a prompt asking you to purchase. It also shows the amount of the movie before purchase.
    Anthony_VZ
    **If someones post has helped you, please acknowledge their assistance by clicking the red thumbs up button to give them Kudos. If you are the original poster and any response gave you your answer, please mark the post that had the answer as the solution**
    Notice: Content posted by Verizon employees is meant to be informational and does not supersede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or plan

  • How to find out what process touched a file

    I am currently running Leopard 10.5.7 on a MacBook. Some of my system files' permissions keep getting screwed up. It happens randomly, and when it does I have to repair permission and reboot the computer to fix it. I am trying to isolate the problem. Is there a way to find out what processes or applications touched a certain file? thanks.

    Tony:
    Did you try repairing your keychain?
    Look in your 'Utilities' folder for the 'Keychain Access' application.
    Run it and use the 'Keychain Access/Keychain First Aid' menu...follow the prompts. After repairs, restart and see if the situation improves.
    If you are determining permission repair status on a repeated basis by simply doing a repair and reacting to the immediate report there, you may be chasing ghosts.
    If you are encountering legitimate issues when running various apps, you may need to check the basics. If there are other users on the machine or you have moved standard applications to custom locations you may have to simplify your overall machine's configuration and go from there.
    Good luck in any case.

  • How do i determine what the "other" usage is on my iPad (3.5 gig)

    how do i determine what the "other" usage is on my iPad (3.5 gig)

    Hey there, I seem to have an issue with the 'other' usage thing.
    On my computer and ipod, it shows like this:
    when I dont even have more than 2+GB in music and less than 1gb in apps and pictures.
    I am on iOS5.1.1 because I had many problems with the Wi-Fi bug for iOS6 (no, it didnt fix for me with 6.0.1)
    I am very frustatred because I cant even sync music anymore. AndI dont want to do a reset because it takes me 3+ hours to transfer my music.
    any help}?

  • How do I determine what 4 computers are authorized to download content from my account?

    How do I determine what 4 computers are authorized to download content from my account?  I need to manage what computers are authorized.

    You can only see a count of how many computers are authorised, you can't see a list of them. If the computers are also associated to your account (e.g. you've used iTunes Match, automatic downloads, or redownloaded past purchases on them) then they might also show in the 'manage devices' section of your account on your computer's iTunes (Store > View Account menu option): Manage your associated devices in iTunes - Apple Support
    You can also, once every 12 months, log into account on your computer's iTunes (Store > View Account) and deauthorise all computers and then reauthorise the computers (which you can only do directly on them) that you still have and need.

Maybe you are looking for