A script to monitor a file in S11 ?

hello all,
i need to find which process access a particular lib in Solaris 11. Unfortunately, iosnoop in DTraceToolkit-0.99 doesn't work anymore. Nor the script found in /usr/demo/dtrace:
root@antigone:~# dtrace /usr/demo/dtrace/iosnoop.d /tmp/toto
dtrace: no probes specified
Are there other sources of dtrace scripts for S11 ?
thanks i, advance for help,
gerard

Are there other sources of dtrace scripts for S11 ?
I'm currently working on updating and refreshing the DTT. See Doc ID 1428139.1 - "DTraceToolkit - A Collection Of Useful DTrace Scripts". This project will get the current scripts working on S10 and S11 and introduce new useful scripts. It's a very time consuming project, which I'm doing on my own time, so will take me a while to get a new version pushed out.
/usr/dtrace/DTT/Bin/opensnoop -f libmysqlclient.so.15
UID PID COMM FD PATH
gives no results at all!
What am i doing wrong?Two probable causes
1) opensnoop used the following probes:
syscall::open:entry, syscall::open64:entry
syscall::open:return, syscall::open64:return
In Solaris 11, open() and open64() system calls (and many more) changed to *at, eg:
ID PROVIDER MODULE FUNCTION NAME
9912 syscall openat entry
9914 syscall openat64 entry
So the probes you have won't fire. Also note that the arguments to open() Vs openat() are different
int open(const char path, int oflag, / mode_t mode */);
int openat(int fildes, const char path, int oflag, / mode_t mode */);
You'll need to modify the opensnoop to change the probes and args.
2) Secondly you need to specify the full path including the filename, not just the filename itself. Try
$ /usr/dtrace/DTT/Bin/opensnoop -f "/usr/mysql/5.0/lib/mysql/libmysqlclient.so.15"
HTH
Steve

Similar Messages

  • How to monitor Alert file large in EM Grid

    Hello,
    In Enterprise Manager 9 we used to monitor Alert File Large.
    I am not able find this in Grid Control.
    Can anybody tell me how to monitor this metric in OEM 10 GRid?
    Best regards,
    Jvries

    You must to select the host target and metric and policy issues
    Select all metrics and search File or Directory size MB
    You can to add the file when you want to monitor the size and
    you must to enable a response action when the critical theshold appear
    The response action must be a shell script like this
    #/bin/ksh
    #if you want backup
    cp /directory/file.log /backup_destination/file.log.bak
    #for clean the file and his size was empth
    /directory/file.logRemember that you want enable the credentials for host and the owner of agent had rights of read and write in the location of file
    Regards

  • Repcheck - A Simple Bash Script To Monitor Remote Repos Commits

    Hello all,
    I'm using a few git/svn packages from the AUR, and only recently realized that while to PKGBUILD itself is able to pull and build the latest version, the package version in the AUR will not update, unless a new PKGBUILD is pushed by the maintainer, and so my update monitor isn't aware of those remote updates.
    I've looked for a convenient way to track such changes, but all I could find were "live" monitors that run constantly and check for updates in a given repo in a set interval.
    It didn't fit my needs, so I wrote a script myself.
    The script basically maintains a file containing repo address and current revision number (for SVN) or hash (for GIT).
    Whenever an update operation is done, all remote hashes are compared to those stored in the file and if updates are found, a notification is sent.
    In case of GIT repos, the script also tries to find corresponding AUR package (I couldn't find a standard for SVN addresses...).
    It is up to the user to update currently installed version to latest remote version if he wants, script only displays notification.
    Dependencies:
    - bash
    - git
    - subversion
    - libnotify
    * EDIT *
    Updated script in next post.
    Last edited by adam777 (2013-06-14 11:55:29)

    #!/bin/bash
    RepVersionsFile=~/repversions
    TempRepVersionsFile=~/repversionsupd
    TempRepUpdatesFile=~/repupdates
    function add_to_list()
    if [ -f $RepVersionsFile ]
    then
    tmp=$(cat $RepVersionsFile | grep $1)
    if [ -n "$tmp" ]
    then
    exit
    fi
    fi
    tmp=$(echo $2 | grep ".git")
    if [ -z "$tmp" ]
    then
    current_hash=$(svn info $2 | grep Revision | awk '{ print $NF }')
    else
    current_hash=$(git ls-remote $2 | grep HEAD | awk '{ print $(NF-1) }')
    fi
    echo -e "$1 $2 $current_hash" >> $RepVersionsFile
    function remove_from_list()
    if [ ! -f $RepVersionsFile ]
    then
    exit
    fi
    tmp=$(cat $RepVersionsFile | grep -v $1)
    if [ -z "$tmp" ]
    then
    rm $RepVersionsFile
    exit
    fi
    echo -e "$tmp" > $RepVersionsFile
    function check_all()
    while read pkgname address hash
    do
    tmp=$(echo $address | grep ".git")
    if [ -z "$tmp" ]
    then
    remote_hash=$(svn info $address | grep Revision | awk '{ print $NF }')
    else
    remote_hash=$(git ls-remote $address | grep HEAD | awk '{ print $(NF-1) }')
    fi
    if [ $remote_hash != $hash ]
    then
    echo -e "$pkgname" >> $TempRepUpdatesFile
    fi
    echo -e "$pkgname $address $remote_hash" >> $TempRepVersionsFile
    done < $RepVersionsFile
    if [ -f $TempRepUpdatesFile ]
    then
    notify-send "Updates Found On Remote Repos" "`cat $TempRepUpdatesFile`"
    rm $TempRepUpdatesFile
    fi
    rm $RepVersionsFile
    mv $TempRepVersionsFile $RepVersionsFile
    case $1 in
    add-address)
    add_to_list $2 $3
    remove-address)
    remove_from_list $2
    update)
    check_all
    echo "Enter Your Choice:";
    echo "1 For Adding A Repository";
    echo "2 For Removing A Repository";
    read userchoice
    if [ "$userchoice" == "1" ]
    then
    echo "Please Enter Package Name";
    read pkgname
    echo "Please Enter Repository Address";
    read repaddress
    repcheck add-address $pkgname $repaddress
    fi
    if [ "$userchoice" == "2" ]
    then
    echo "Please Enter Package Name";
    read pkgname
    repcheck remove-address $pkgname
    fi
    esac
    Last edited by adam777 (2013-08-07 16:09:00)

  • Does SCOM 2012 monitor "Persona File Handles"?

    Hi,
    I have query whether SCOM 2012 can monitor "Persona File Handles"? Plan is for monitoring threshold limit of 3 lacs file handles on HVDs. If it can be monitored, the alert should be triggered only when it reaches 3 lacs file handles.
    We have SCOM 2012 SP1
    Please answer asap.
    Thanks,
    Naren.
    Thanks & regards, Naren.

    I would suggest you look into the veeam MP for VMWare http://www.veeam.com/management-pack-system-center-resources.html
    I'm not to familiar with "Persona
    File Handles"  but if there's a command you can run to check it then it can be scripted and thus monitored by a custom monitor.
    Cheers,
    Martin
    Blog:
    http://sustaslog.wordpress.com 
    LinkedIn:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • Script to open INDD files, run script, and close

    Hello, I'm looking for a script that will open a folder of Indesign files, open each one, run a selected script, then close each file.
    RIght now I'm using the Batch convert script, to convert INDD to INDD and run the script in between (then I delete the extra INDD file). But I'm trying to eliminate the conversion element, just need the script part of it.
    Anyone have any help? Thanks.

    Here's my whole code if it helps. I'm wondering if the script is moving too fast. I think that the first files are still PDFing while the others are opening and closing. Could that be it? I'm not sure why else the for loop for the PDFing is only working on the first file.
    var myFolder = Folder.selectDialog("Select Input Folder");
    var myIndsnFiles = myFolder.getFiles("*.indd");
    var exportPath=Folder("/").selectDlg("Select PDF output folder:");
    var pdfPreset = "Press Quality";
    for(k=0; k<myIndsnFiles.length; k++)
        app.open(myIndsnFiles[k]);
        var jobNumber = "12345";
            for (aPage=0; aPage < app.activeDocument.pages.length; aPage++)
                app.pdfExportPreferences.pageRange = app.activeDocument.pages[aPage].name;
                app.activeDocument.exportFile (ExportFormat.PDF_TYPE, File(exportPath+"/"+jobNumber+"_"+pad(app.activeDocument.pages[aPage].name)+".pdf"), false, pdfPreset);
                function pad (n) {
                return ("00000"+n).slice(-3);
    app.activeDocument.close();

  • How can I script a Flash .exe file to always stay on top of all other windows?

    Hi All,
    I'm new to action script, and I just need this one script
    > How can I script a Flash .exe file to always stay on top of
    all other windows?
    Basically what i want to do is have a flash-created
    step-by-step instructional movie, but for the movie to remain on
    top of all windows so the instructee is able to follow the
    instructions on-screen...
    It would be preferable to not have to buy another product
    just to do this... as I said, this is the only scripting I need.
    Thanks in advance
    Cheers
    Rick

    if you create your exe with mProjector you can use one of its
    new AS
    commands to do this.
    setZOrder
    http://www.screentime.com/software/mprojector/docs/mWin_setZOrder.htm
    all APIS
    http://www.screentime.com/software/mprojector/docs/index.html
    Demo
    http://www.screentime.com/software/mprojector/demo.html
    mProjector installs new classes and help into Flash, to
    enable them you
    must build your app with mProjector (its input is your swf)
    John Pattenden
    Screentime Media - Flash Tools since 1997
    http://www.screentime.com

  • How to monitor a file in oracle

    Hi,
    I am running a job using DBMS_job package where the job should look for a file.If the file exists only job should run.Can i use these dependencies in dbms_job package??
    What is the syntax for utl_file to monitor a file wehter it exists or not
    Thanks

    What you want is to resubmit the job by adding n number of seconds to the original job.
    Let us say your job starts at 1 AM and the file is not there yet, so the job should reschedule itself
    to run at 1:30 and then at 1:30 it will check the existence of file, if the file is not there it should further reschedule itself.
    There is a way to do it. Search in metalink forums .

  • How to load SQL scripts from a text file.

    Hi, i tried several time to load a text file/SQL script with 10 different tables and data, but 10g Express doesen't allows me to do that, any one can direct me or point out to me what i should do or do i need to adopt any special method to to get this done. i am sure there must be some thing where you can upload SQL scripts from a text file (in SQL command editor!). thanks

    Hi,
    see my other answer here:
    SQL command editor doesn't take more than 1 insert command
    This seems to be a duplicate question, right? Or am I missing something?
    Regards,
    ~Dietmar.

  • A script for copying smilar files to a new location

    Hi,
    i newbies to scripting. My challenge is that I want a script to only copy files with names "similar" and not "exactly the same" as the filenames in the text file.
    For example some files have 10 letters file name like "ABC01FGH01.tif".  I have to copy file where starting letter "ABC" and middle letter "FGH" of file name are fixed, but other letters are changed.
    The script sees a file name like "ABC**FGH**.tif", it should search the source location and copy the files having filenames with at least this characters e.g. "ABC02FGH02.tif", "ABC03FGH04.tif" should be copied since it has
    contains "ABC**FGH**.tif".
    Please help.

    Learn how to use wildcards in file names.  '*' is for any number of characters and'?' is for one character.
    COPY ABC??DE???.?x? c:\target
    Start by using DIR
    DIR ABC??DEF???JK.?x?
    ¯\_(ツ)_/¯

  • FDM import script with selectable source file

    Hi All,
    I would like to build an import script attached to an import format that imports a text file with multiple value columns.
    Source file:
    Entity, Detail, Account 1, Account 2
    E_abc, D_abc, 100, 200
    In FDM this needs to be:
    Entity, Detail, Account, Amount
    E_abc, D_abc, Account 1, 100
    E_abc, D_abc, Account 2, 200
    So i need to loop through the file.
    My biggest challenge is that when i attach a script to an import format in the import process i cannot select a file from inbox anymore, it has to be a pre-defined file.
    Has someone an example or solution how to make a script-import format and enable the select file from inbox?
    And if possible has someone an example script of the issue stated above?
    Thanks in advance,
    Marc

    Hi Wayne..
    Thanks for your reply (and sorry for the delay in mine).
    Could you tell me what script to use to open the file in the befImport script, or how to rename the file in memory to a new one?
    So i write a script that rewrites the file to a new file in the inbox but i need to tell FDM that it needs to process this new file.
    Thanks,
    Marc

  • TSQL Script to monitor SQL Server transactional and snapshot replication

    Hi Team,
    Could you please let me know do you have any TSQL script to monitor replication(Transactional, Snapshot) with current status ? I have tried below script but it giving error. could you please have a look at the below script or do you have any other new TSQL
    script to monitor the replication status ?
    "Msg 8164, Level 16, State 1, Procedure sp_MSload_tmp_replication_status, Line 80
    An INSERT EXEC statement cannot be nested."
    DECLARE @srvname VARCHAR(100)
    DECLARE @pub_db VARCHAR(100)
    DECLARE @pubname VARCHAR(100)
    CREATE TABLE #replmonitor(status    INT NULL,warning    INT NULL,subscriber    sysname NULL,subscriber_db    sysname NULL,publisher_db    sysname NULL,
    publication    sysname NULL,publication_type    INT NULL,subtype    INT NULL,latency    INT NULL,latencythreshold    INT NULL,agentnotrunning    INT NULL,
    agentnotrunningthreshold    INT NULL,timetoexpiration    INT NULL,expirationthreshold    INT NULL,last_distsync    DATETIME,
    distribution_agentname    sysname NULL,mergeagentname    sysname NULL,mergesubscriptionfriendlyname    sysname NULL,mergeagentlocation    sysname NULL,
    mergeconnectiontype    INT NULL,mergePerformance    INT NULL,mergerunspeed    FLOAT,mergerunduration    INT NULL,monitorranking    INT NULL,
    distributionagentjobid    BINARY(16),mergeagentjobid    BINARY(16),distributionagentid    INT NULL,distributionagentprofileid    INT NULL,
    mergeagentid    INT NULL,mergeagentprofileid    INT NULL,logreaderagentname VARCHAR(100),publisher varchar(100))
    DECLARE replmonitor CURSOR FOR
    SELECT b.srvname,a.publisher_db,a.publication
    FROM distribution.dbo.MSpublications a,  master.dbo.sysservers b
    WHERE a.publisher_id=b.srvid
    OPEN replmonitor 
    FETCH NEXT FROM replmonitor INTO @srvname,@pub_db,@pubname
    WHILE @@FETCH_STATUS = 0
    BEGIN
    INSERT INTO #replmonitor
    EXEC distribution.dbo.sp_replmonitorhelpsubscription  @publisher = @srvname
         , @publisher_db = @pub_db
         ,  @publication = @pubname
         , @publication_type = 0
    FETCH NEXT FROM replmonitor INTO @srvname,@pub_db,@pubname
    END
    CLOSE replmonitor
    DEALLOCATE replmonitor
    SELECT publication,publisher_db,subscriber,subscriber_db,
            CASE publication_type WHEN 0 THEN 'Transactional publication'
                WHEN 1 THEN 'Snapshot publication'
                WHEN 2 THEN 'Merge publication'
                ELSE 'Not Known' END,
            CASE subtype WHEN 0 THEN 'Push'
                WHEN 1 THEN 'Pull'
                WHEN 2 THEN 'Anonymous'
                ELSE 'Not Known' END,
            CASE status WHEN 1 THEN 'Started'
                WHEN 2 THEN 'Succeeded'
                WHEN 3 THEN 'In progress'
                WHEN 4 THEN 'Idle'
                WHEN 5 THEN 'Retrying'
                WHEN 6 THEN 'Failed'
                ELSE 'Not Known' END,
            CASE warning WHEN 0 THEN 'No Issues in Replication' ELSE 'Check Replication' END,
            latency, latencythreshold, 
            'LatencyStatus'= CASE WHEN (latency > latencythreshold) THEN 'High Latency'
            ELSE 'No Latency' END,
            distribution_agentname,'DistributorStatus'= CASE WHEN (DATEDIFF(hh,last_distsync,GETDATE())>1) THEN 'Distributor has not executed more than n hour'
            ELSE 'Distributor running fine' END
            FROM #replmonitor
    --DROP TABLE #replmonitor
    Rajeev R

    INSERT INTO #replmonitor
    Hi Rajeev,
    Could you please use the following query and check if it is successful?
    INSERT INTO #replmonitor
    SELECT a.*
    FROM OPENROWSET
    ('SQLNCLI', 'Server=DBServer;Trusted_Connection=yes;',
    'SET FMTONLY OFF; exec distribution..sp_replmonitorhelpsubscription
    @publisher = DBServer,
    @publication_type = 0,
    @publication=MyPublication') AS a;
    There is a similar thread for your reference.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/634090bf-915e-4d97-b71a-58cf47d62a8a/msg-8164-level-16-state-1-procedure-spmsloadtmpreplicationstatus-line-80?forum=sqlreplication
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • Broken: PS script to recursively zips files into one zip file

    Hi
    I'd like a script which zips all files and subfolders older than a specified date.
    I've have spent a fair bit of time hacking with no luck.
    I'd greatly appreciate any help.
    AJ
    PS. This script seems to do the trick -
     $folder = "C:\temp2\" 
     $zipFileName = "C:\temp\test3.zip" 
     $zip_date = Get-Date "6/5/2014"
     set-content $zipFileName ("PK" + [char]5 + [char]6 + ("$([char]0)" * 18)) 
     $ZipFile = (new-object -com shell.application).NameSpace($zipFileName) 
     Get-ChildItem $folder | foreach {$zipFile.CopyHere($_.fullname)} 
    However, when I enter where clause  only the top folder is zipped?
    Get-ChildItem $folder| Where-Object { $_.LastWriteTime -lt $zip_date }  | foreach {$zipFile.CopyHere($_.fullname)} 
    AJ
    Ps. I'm using script from http://stackoverflow.com/questions/5641162/compress-files-in-folder-to-zip-file-by-using-ps

    Hi Rapido2,
    Thanks for your sharing =)

  • Script for moving & deleting files

    Hi
    I'm quite new to scripts & looking for a script to move selected files with time-stamp & also a script to delete selected file/s in a directory. Below is an example of my requirement
    Move
    Ex:  c:\work\source\test.txt to c:\work\target\test.txt_04202015022100
    Delete
    Ex: c:\work\target\test-1.txt
    Could someone help me please.
    Thank very much
    Neil

    This forum is for scripting questions rather than script requests.
    Please start by reading the following:
    Posting guidelines
    Handy tips for posting to this forum
    How to ask questions in a technical forum
    Rubber duck problem solving
    How to write a bad forum post
    Help Vampires: A Spotter's Guide
    -- Bill Stewart [Bill_Stewart]

  • Need a script to delete user files and run on logout.

    Hi folks!
    I'm a total Mac novice so forgive me if I'm vague on anything here. I work in a library and we have recently acquired an iMac running Mountain Lion. The unit is primarily for use by Visually Impaired users however sighted folks can use it as well.
    What I need is something that will delete any files created/downloaded by the sighted users but that will not delete anyone else's files. I tried just using the Guest Account however that also deletes all the system preferences for that account including the dock setup which I need to stay the same.
    If possible I would like this to run on logout.
    For additional points anyone who can also find me something that will run automatically when the users sign in and will sign them out after 30 minutes would super spectacularly awesome.
    Thanks people!

    That being said, if you you still really want to do this you can create a logout hook and write a shell script to remove the files.  See "About Daemons and Services", Appendix B on writing a logout hook.
    But a far easier way is to create Account's login item that will cause a shell script to be launched to delete the files.  You can encapsulate the shell script so it runs as an application that can be added to the Login Items.  One such encapsulator is Platypus.
    Note, rather than delete them, if you want to ensure all the specific plists have specific settings, then create a master set of them and copy the master set into the Preferences directory (being careful to observe ownership and permissions settings of course).

  • How to download the script data into pdf file

    how to download the script data into pdf file
    i have one option to download the script data to pdf file --->rstxpdft4 program.
    i have one doubt how to use this proogram.or any function module to download the script data to pdf file.
    Thanks and regards,
    Sri.

    Hi      Sri Sai,
    I know one method to convert the sapscript to pdf file :
    first generate a Spool Request for the required Sapscript
    then goto transaction SP01 and copy the generated Spool Request number
    now execute the SAP report RSTXPDFT4
    here enter the copied Spool request number and the target directory into the parameters
    execute the report
    required pdf file will be generated into the target directory
    i hope it will help you out
    Please refer this simple program:
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    Reward points if found helpful....
    Cheers,
    Eshwar.

Maybe you are looking for

  • Color Profiles

    When I need to get a photo book printed from an online photo book printer, I first have to rasterize all of my pages from InDesign. To do this I export a high res PDF and then rasterize each page in photoshop. My question is about the sRGB color spac

  • Exporting the Document structure from CDESK

    Hi, I have a requirement to export the Document structure coming in Tcode CDESK for assemblies to Excel format with the fields like MM#, Description,ECM#, User etc.... How to get it ? Thanks, Suresh HP

  • Coloured portion in XY graph

    Dear All, I am trying to build a vi which starts to find the average of data points. The starting point is specified with the no of points taken for the averaging. I like to have a coloured region - a line to be shown in the XY graph where the s

  • Control Chart in QM

    Hi, This question relates to QM module control charts. The user has to select control chart type to inspection lot in QGC1. Is it possible to configure the particular control chart to inspection lot. Thanks in advance. Regards, Mukund Natraj

  • 11/14/2012 AIR 3.5 Runtime and SDK Beta Update

    We're pleased to announce the availability of AIR beta 3.5.0.690. You can download the BETA here: http://labs.adobe.com/downloads/air3-5.html This beta contains the following fixes: Minor improvements in security and stability. Minor improvements in