Fuser file name is slow

We are using OEL 4.6 as oracle DB server. When using fuser <file name>, it takes long time (from 1 to 3 minutes):
[root@oracledb2 ~]# time fuser install.log
real 1m0.936s
user 0m1.172s
sys 0m59.272s
[root@oracledb2 ~]#
A quick look of the server:
top - 15:12:46 up 6 days, 35 min, 3 users, load average: 0.38, 0.34, 0.44
Tasks: 558 total, 1 running, 557 sleeping, 0 stopped, 0 zombie
Cpu(s): 4.4% us, 0.6% sy, 0.0% ni, 94.3% id, 0.7% wa, 0.0% hi, 0.1% si
Mem: 24684204k total, 24573992k used, 110212k free, 136364k buffers
Swap: 10256376k total, 2752336k used, 7504040k free, 20665884k cached
After first time it happened, I up2date it and rebooted server. After 5 days, it happened again.
Can anyone help please? Thanks in advance.
Edited by: user1671679 on Mar 16, 2009 12:15 PM

Still too many records to show grep ^read /tmp/fuser.trace
Part of it are:
read(4, "uct/11.1.0/dbs/hc_apexp.dat\na4d9"..., 1024) = 1024
read(4, " /opt/oracle/product"..., 1024) = 1024
read(4, " fd:02 1433437 "..., 1024) = 1024
read(4, "186000-a5187000 r-xs 00000000 fd"..., 1024) = 1024
read(4, "ct/11.1.0/dbs/hc_apexp.dat\na518f"..., 1024) = 1024
read(4, " /opt/oracle/product/"..., 1024) = 1024
read(4, "fd:02 1433437 "..., 1024) = 1024
read(4, "70000-a5571000 r-xs 00000000 fd:"..., 1024) = 1024
read(4, "t/11.1.0/dbs/hc_apexp.dat\na55790"..., 1024) = 1024
read(4, " /opt/oracle/product/1"..., 1024) = 1024
read(4, "d:02 1433437 "..., 1024) = 1024
read(4, "3000-a5594000 r-xs 00000000 fd:0"..., 1024) = 1024
read(4, "/11.1.0/dbs/hc_apexp.dat\na559c00"..., 1024) = 1024
read(4, " /opt/oracle/product/11"..., 1024) = 1024
read(4, ":02 1433437 "..., 1024) = 1024
read(4, "000-a597e000 r-xs 00000000 fd:02"..., 1024) = 1024
read(4, "11.1.0/dbs/hc_apexp.dat\na5986000"..., 1024) = 1024
read(4, " /opt/oracle/product/11."..., 1024) = 1024
read(4, "02 1433437 "..., 1024) = 1024
read(4, "00-a59a1000 r-xs 00000000 fd:02 "..., 1024) = 1024
read(4, "1.1.0/dbs/hc_apexp.dat\na59a9000-"..., 1024) = 1024
read(4, " /opt/oracle/product/11.1"..., 1024) = 1024
read(4, "2 1433437 "..., 1024) = 1024
read(4, "0-a5d88000 r-xs 00000000 fd:02 1"..., 1024) = 1024
read(4, ".1.0/dbs/hc_apexp.dat\na5d90000-a"..., 1024) = 1024
read(4, " /opt/oracle/product/11.1."..., 1024) = 1024
read(4, " 1433437 "..., 1024) = 1024
read(4, "-a5dab000 r-xs 00000000 fd:02 14"..., 1024) = 1024
read(4, "1.0/dbs/hc_apexp.dat\na5db3000-a5"..., 1024) = 1024
read(4, " /opt/oracle/product/11.1.0"..., 1024) = 1024
read(4, "1433437 "..., 1024) = 1024
read(4, "a6195000 r-xs 00000000 fd:02 143"..., 1024) = 1024
read(4, ".0/dbs/hc_apexp.dat\na619d000-a61"..., 1024) = 1024
read(4, " /opt/oracle/product/11.1.0/"..., 1024) = 1024
read(4, "433437 "..., 1024) = 1024
read(4, "61b8000 r-xs 00000000 fd:02 1433"..., 1024) = 1024
read(4, "0/dbs/hc_apexp.dat\na61c0000-a61c"..., 1024) = 1024
read(4, " /opt/oracle/product/11.1.0/d"..., 1024) = 1024
read(4, "33437 "..., 1024) = 1024
For more info, sysctl.conf is:
#kernel.shmall = 5767168
kernel.shmall = 6291456
kernel.shmmax = 6442450944
kernel.shmmni = 4096
fs.file-max = 6553600
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
net.ipv4.tcp_wmem = 262144 262144 262144
net.ipv4.tcp_rmem = 4194304 4194304 4194304
#The following line are added according to Doc ID: Note:353529.1
#Requirements for Installing Oracle 9iR2 64-bit on RHEL 4 x86-64 (AMD64/EM64T)
fs.aio-max-nr = 3145728
##fs.file-max = 6553600
The server has 3 oracle homes(9.2.0.8, 10.2.0.4 and 11.1.0.6) that hosts 12 instances. But not so many users access the server.
Edited by: user1671679 on Mar 17, 2009 5:18 AM

Similar Messages

  • Camera Roll - File names and the counter

    This is my first iPhone, so I don't know if this is a new issue or not. But one thing that has been bugging me is the camera roll. Some people leave all their pictures there, while others use it as a "temporary folder" until their next sync, and then they put those photos in other folders, etc. I used to keep all my pics in the Camera Roll until I got a lot of them and realized how slow it was for all of them to load when downloading them via Image Capture. I also hear all these stories online of people "loosing" their files from their camera roll so I now MOVE my pictures out of there, and put them in various other folders to organize them (like "screenshots" "family pictures" etc) which then get synced back to my iPhone for viewing.
    My problem is, the FILE NAMING.
    So lets say I take a photo. It is named IMG_0001.JPG
    Then I take a screenshot. It is named IMG_0002.PNG
    Then I sync my phone. Both are moved to my pictures folder, and removed from the phone. The screenshot goes in my screenshots folder and the photo goes to a photo folder.
    I go to take another picture. But, it gets named IMG_0001.JPG
    The problem here? I go to move that picture into a folder with others and I get an error saying that a file with the same name exists. I then have to rename the file or delete the old one to be able to put it in the folder.
    So, whats going on? Why isn't that third picture named IMG_0003.jpg?
    My Kodak digital camera names its files the same way. (actually, 100_0001, 100_0002, etc) and when I clear the pictures off the card, it KEEPS THE NUMBERING! (until I reach 100_9999, and then it goes to 101_0001)
    Any ideas (other then mass renaming all of my existing files?)
    Also, I am aware that I can use iPhoto instead as it doesn't care about the filenames, but then if I ever want to pull them out of iPhoto, I am still screwed with messed up file names.
    I can't believe a bug like this still hasn't been fixed by Apple. There must be something I'm doing wrong.
    Thanks in advance for any suggestions or comments about this issue.
    -Scott

    Does anyone know if this has been fixed in 4.1?
    I upgraded to it, but I'm afraid to delete all my photos to see if the number will correct itself or not.

  • Is it possible to change file name policy in the JRE cache folder?

    We are getting calls from our clients complaining of slowdowns in loading our Java applet. The reason is a virusscanner. If a virusscanner is in the middle, it can drastically slow down the download process, and therefore cause some high delay before the user can work on the our product as expected.
    On this csutomer's side, it may take up to 10 min (the first time it is ran) instead of 1 min. JRE 1.6 is in use.
    They dont want to exclude from antivirus scan all files from Sun\Java\Deployment\cache folder.
    Question:
    Is it possible to change file name policy in the JRE cache to make it less unique?
    Thanks,
    -Dima

    dgomel wrote:
    We are getting calls from our clients complaining of slowdowns in loading our Java applet. The reason is a virusscanner. If a virusscanner is in the middle, it can drastically slow down the download process, and therefore cause some high delay before the user can work on the our product as expected.
    On this csutomer's side, it may take up to 10 min (the first time it is ran) instead of 1 min. JRE 1.6 is in use.
    They dont want to exclude from antivirus scan all files from Sun\Java\Deployment\cache folder.
    Question:
    Is it possible to change file name policy in the JRE cache to make it less unique?
    I suggest you solve the real problem - big files.
    There are two scenarios
    1. Initial download
    2. Updates.
    The first takes as long as it takes. No way around it.
    The second means that you can't use one jar. Otherwise every single update requires downloading the entire application every time. Multiple jars means only the one that changed is downloaded.

  • Why don't my iphoto event names match up to my iphoto master file names?

    Yosemite 10.10
    iPhoto 9.6
    MacBook Pro 2009
    I recently downloaded Yosemite, which has slowed my laptop down significantly. This has prompted me to transfer all large files - photos, movies and music off my laptop and onto an external hard drive (in addition to my time machine backup hard drive).
    I was instructed (at the Apple Store) to open Finder then Pictures > iPhoto Library. Then to right click on the iPhoto Library folder and select 'show package contents', this reveals a large list of folders but I understand that the Masters folder is the one to care about with respect to back ups. When I open up Masters I can see 8 folders labelled 2007 - 2014. In each of these folders are other folders housing all the jpeg files.
    THE PROBLEM:
    For some reason in the 2007-2009 folders the Master file names match up to the Event names in iPhoto. This is great and makes sense! However, after 2009 everything gets really messed up in the Masters folder - despite my iPhoto Library being meticulously organised into Events that are all labelled. For example, when I open up the 2014 folder the path looks like this 2014 > 10 > 06 > 20141006-214510 > which then houses the jpeg images. It looks to me like these folders represent upload events as opposed to the Events that I organised them into in the front end of iPhoto. WHY!?!
    THE QUESTIONS:
    Why is this happening? And can I fix it so that it doesn't happen when I next import photos into iPhoto?
    Should I just stop using iPhoto?
    What happens if I change the names of the Master folders in the back end of iPhoto to reflect the Event names in the front end? Would it be better to just organise them on my hard drive?
    Thank you

    1. It's not a problem as you never ever access your photos in this way.
    2. If you want to back up your original photos you do this via the Export function: File -> Export
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.
    3. None of this saves space on your HD. To do that you need to move your Library from the HD to the external:
    Make sure the drive is formatted Mac OS Extended (Journaled)
    a. Quit iPhoto
    b. Copy the iPhoto Library from your Pictures Folder to the External Disk.
    c. Hold down the option (or alt) key while launching iPhoto. From the resulting menu select 'Choose Library' and navigate to the new location. From that point on this will be the default location of your library.
    d. Test the library and when you're sure all is well, trash the one on your internal HD to free up space.
    4. That particular Apple Genius isn't.
    As to the specific questions:
    Why is this happening? And can I fix it so that it doesn't happen when I next import photos into iPhoto?
    It's happening as that is how iPhoto works and there is nothing ti fix. Exporting makes the issue redundant.
    Should I just stop using iPhoto?
    Why?
    What happens if I change the names of the Master folders in the back end of iPhoto to reflect the Event names in the front end?
    You'll corrupt the Library. And it's unnecessary.
    Would it be better to just organise them on my hard drive?
    No.

  • File name and Version name corruption

    In a section of my library, if I click on a thumbnail, it opens with a different photo than the thumbnail and the thumbnail then changes to this other photo. The Metadata indicates that the file name is referencing the surprise photo and the version is referencing the original photo. Since all my files are referenced, if I Show in the Finder, the reference is to the surprise photo. This appears to be just in my 2006 year folder of photos (3500) but seems to have occurred randomly throughout that year. It is really a mess.
    fyi, my photos are organized with folders for each year and then projects and subfolders for the various events. Total library is about 65,000 photos. All are referenced.
    Any clue as to what is happening and how to correct it would be appreciated.
    thanks, gib

    My masters are on a Drobo drive that is only 1/2 full. I talked with Apple today but the support person was not able to determine the issue. He thought the Drobo could be an issue, although his experience was more with slower response time. (I am very pleased with the Drobo.) He suggested that I trash the offending projects, setup new ones and re-import the masters. Ok but lose metadata and adjustments but may be the next step to take.

  • File Name Stamper

    Hello All,
    I am using: http://acrobatusers.com/assets/uploads/actions/File_Name_Stamper.pdf
    It works great for one file. But for multiple files, a popup dialog box keeps showing up. Our small non-profit organization is processing 1000+ files and pressing the enter key is cumbersome.
    The actual JavaScript code is below. Is there a way to disable the popup dialog box?
    Many thanks...
    //   File Name Stamper Action Script
    //   by Thom Parker, WindJack Solutions, Inc.
    //      www.windjack.com, www.pdfscripting.com
    //   for Adobe Systems Inc. www.adobe.com
    //       NOTE: Only for use in an Action Script
    //       Requires:  Acrobat 10 or later
    //   Stamps the PDF file Name/Title/Date onto a PDF
    //   A popup dialog for entering stamping parameters
    //   is displayed for each PDF processed by the Action
    //   Parameters include Position, Text Size, Font, Text Color
    //   The stamp is created watermark
    //   Version 1.2 - 11/5/2020
    //Acrobat JavaScript Dialog
    //Created by DialogDesigner from WindJack Solutions
    //<CodeAbove>
    var aFontNames = [
    "Helvetica",
    "Times",
    "Courier",
    var aDateFmts = [
                "mm/dd/yyyy",
                "yyyy-mm-dd",
                "mmmm d, yyyy",
                "ddd mmm d, yyyy",
                "dddd mmmm d, yyyy"
    function SetLabelText(dialog, dlg)
         var strLab = "";
         var oRslt = dialog.store();
         strLab = oRslt["FlNm"]?dlg.strDocFileName:dlg.strDocTitle;
         if(oRslt["HDat"])
            var path = new Array();
             strLab += " - " + ( (dlg.GetListSel(oRslt["DFmt"],path))?path.reverse():"").toString();
         dialog.load({"DcSt":strLab});
    //</CodeAbove>
    if(typeof(global.FileNameStamp) == "undefined")
    global.FileNameStamp =
        result:"cancel",
        DoDialog: function(){return app.execDialog(this);},
        strLabSource:"FlNm",
        strDocStamp:"",
        bUseDate:false,
        strDateFormat:"",
        strFontName:["Helvetica"],
        strFontSize:"12",
        strFontColor:"000000",
        strHorzPos:"PosR",
        nMarginX:"0.5",
        strVertPos:"PosT",
        nMarginY:"0.5",
        strPgRangeSel:"rAll",
        strStrtPg:"",
        strEndPg:"",
        GetRadioSel:function(oRslts,aCtrls){
          for(var strRtn=aCtrls[0];aCtrls.length>0;strRtn=aCtrls.pop()){
            if(oRslts[strRtn] == true)
              return strRtn;
          return "";
        SetListSel:function(list,path){if(path.length == 0) return;
        eval("list[\""+ ((typeof path.join != "function")?path:path.join("\"][\"")) + "\"] = 1")},
        GetListSel:function(oLstRslts,path){
           for(var item in oLstRslts){
              if( ((typeof oLstRslts[item]=="number")&&(oLstRslts[item]>0))
                 || this.GetListSel(oLstRslts[item],path) )
               {path.push(item);return true;}
           return false;
        bHidden:true,
        nNumPages:1,
        nCurPage:0,
        strDocTitle:"My Title",
        strDocFileName:"mytestdoc.pdf",
        SetTheLabel:SetLabelText,
        initialize: function(dialog)
            var listDFmt = new Object();
            this.SetListSel(listDFmt, this.strDateFormat);
            var listFont =
                "Helvetica": -1,
            this.SetListSel(listFont, this.strFontName);
            var dlgInit =
                "Font": listFont,
                "FtSz": this.strFontSize,
                "FtCl": this.strFontColor,
                "MrgH": this.nMarginX,
                "MrgV": this.nMarginY,
                    "DcSt": this.strDocStamp,
                    "HDat": this.bUseDate,
                    "tFPg": this.strStrtPg,
                    "tTPg": this.strEndPg,
            dlgInit[this.strLabSource] = true;
            dlgInit[this.strHorzPos] = true;
            dlgInit[this.strVertPos] = true;
            dlgInit[this.strPgRangeSel] = true;
            dialog.load(dlgInit);
            dialog.enable(
                    "tTPg": false,
                    "tFPg": false,
                    "DFmt": false,
            if( (this.strStrtPg == "")|| isNaN(this.strStrtPg) || (Number(this.strStrtPg) > this.nNumPages) )
               if(this.bHidden)
                   this.strStrtPg = "1";
               else
                   this.strStrtPg = (this.nCurPage+1).toString();
            if((this.strEndPg == "") || isNaN(this.strEndPg) || (Number(this.strEndPg) > this.nNumPages) )
               this.strEndPg = this.nNumPages.toString();
            var flist = {};
            for(var i=0;i<aFontNames.length;i++)
            for(var nm in font)
               flist[font[nm]] = -1;
            flist[this.strFontName] = 1;
            var dlist = {};
            var oDt = new Date();
            for(var i=0;i<aDateFmts.length;i++)
               dlist[util.printd(aDateFmts[i],oDt)] = (i==0)?1:-1;
            var exInit ={"tFPg": this.strStrtPg,"tTPg":this.strEndPg, "sOfN":"of (" + this.nNumPages+")",
                                 "DcSt":(this.strLabSource == "FlNm")?this.strDocFileName:this.strDocTitle,
                                 "TopL":"Working on File: " + this.strDocFileName, "Font":flist, "DFmt":dlist };
            if(this.bHidden && this.strPgRangeSel == "rCur")
                  this.strPgRangeSel = "rAll";
                  exInit["rCur"] = false;
                  exInit[this.strPgRangeSel] = true;
            dialog.load(exInit);
            var exInit = {"ExPg":this.strPgRangeSel =="rFro", "MrgH":this.strHorzPos!="PosC", "MrgV":this.strVertPos!="PosM",
                                    "tFPg":this.strPgRangeSel =="rFro", "tTPg":this.strPgRangeSel == "rFro", "rCur":!this.bHidden,
                                    "DcSt":(this.strLabSource == "Titl"), "DFmt":this.bUseDate};
            dialog.enable(exInit);
            this.SetTheLabel(dialog,this);
        validate: function(dialog)
            var oRslt = dialog.store();
            if(isNaN(oRslt["FtSz"]) || (Number(oRslt["FtSz"]) < 0))
                 app.alert("Font Size must be a positive number");
                 return false;
            var rg = /([\dabcdef]{2})([\dabcdef]{2})([\dabcdef]{2})/i;
            if(!rg.test(oRslt["FtCl"]))
                 app.alert("The Font Color must be a series of 3 pairs of Hexadecimal numbers,"
                               + " where each pair represents one 8 bit color component, Red Green Blue\n"
                               + "For Example:\n   Black = 000000,  Red = FF0000, Green = 00FF00, Blue = 0000FF");
                 return false;
            if(isNaN(oRslt["MrgH"]) || (Number(oRslt["MrgH"]) < 0))
                 app.alert("The Horizontal Margin must be a positive number");
                 return false;
            if(isNaN(oRslt["MrgV"]) || (Number(oRslt["MrgV"]) < 0))
                 app.alert("The Vertical Margin must be a positive number");
                 return false;
            return true;
        commit: function(dialog)
            var oRslt = dialog.store();
            this.strLabSource = this.GetRadioSel(oRslt,["FlNm","Titl"]);
            this.strDocStamp = oRslt["DcSt"];
            this.bUseDate = oRslt["HDat"];
            var path = new Array();
            this.strDateFormat = (this.GetListSel(oRslt["DFmt"],path))?path.reverse():"";
            var path = new Array();
            this.strFontName = (this.GetListSel(oRslt["Font"],path))?path.reverse():"";
            this.strFontSize = oRslt["FtSz"];
            this.strFontColor = oRslt["FtCl"];
            this.strHorzPos = this.GetRadioSel(oRslt,["PosL","PosC","PosR"]);
            this.nMarginX = oRslt["MrgH"];
            this.strVertPos = this.GetRadioSel(oRslt,["PosT","PosM","PosB"]);
            this.nMarginY = oRslt["MrgV"];
            this.strPgRangeSel = this.GetRadioSel(oRslt,["rAll","rCur","rFro"]);
            this.strStrtPg = oRslt["tFPg"];
            this.strEndPg = oRslt["tTPg"];
        "But1": function(dialog)
            dialog.end("Abrt");
        "tTPg": function(dialog)
            var x;
        "rFro": function(dialog)
            dialog.enable({tFPg:true, tTPg:true, "ExPg":true});
        "rCur": function(dialog)
            dialog.enable({tFPg:false, tTPg:false,"ExPg":false});
        "rAll": function(dialog)
            dialog.enable({tFPg:false, tTPg:false, "ExPg":false});
        "PosB": function(dialog)
            dialog.enable({"MrgV":true});
        "PosM": function(dialog)
            dialog.enable({"MrgV":false});
        "PosT": function(dialog)
            dialog.enable({"MrgV":true});
        "PosR": function(dialog)
            dialog.enable({"MrgH":true});
        "PosC": function(dialog)
            dialog.enable({"MrgH":false});
        "PosL": function(dialog)
            dialog.enable({"MrgH":true});
        "DFmt": function(dialog)
            this.SetTheLabel(dialog,this);
        "HDat": function(dialog)
            this.SetTheLabel(dialog,this);
            dialog.enable({"DFmt":dialog.store()["HDat"]});
        "DcSt": function(dialog)
            var oRslt = dialog.store();
            if(oRslt["Titl"])
              this.strDocTitle = oRslt["DcSt"];
        "Titl": function(dialog)
            this.SetTheLabel(dialog,this);
            dialog.enable({"DcSt":true});
        "FlNm": function(dialog)
            this.SetTheLabel(dialog,this);
            dialog.enable({"DcSt":false});
        description:
            name: "File Name Stamper",
            elements:
                    type: "view",
                    elements:
                            type: "view",
                            char_height: 10,
                            elements:
                                    type: "static_text",
                                    item_id: "TopL",
                                    name: "Put Dialog Controls Here",
                                    char_width: 15,
                                    alignment: "align_fill",
                                    font: "palette",
                                    bold: true,
                                    type: "cluster",
                                    item_id: "cls1",
                                    name: "Label Options",
                                    elements:
                                            type: "view",
                                            align_children: "align_row",
                                            alignment: "align_fill",
                                            elements:
                                                    type: "radio",
                                                    item_id: "FlNm",
                                                    group_id: "FUse",
                                                    name: "Use File Name",
                                                    variable_Name: "strLabSource",
                                                    type: "radio",
                                                    item_id: "Titl",
                                                    group_id: "FUse",
                                                    name: "Use Document Title (or custom)",
                                                    type: "edit_text",
                                                    item_id: "DcSt",
                                                    variable_Name: "strDocStamp",
                                                    width: 200,
                                                    height: 23,
                                                    alignment: "align_fill",
                                            type: "view",
                                            align_children: "align_row",
                                            elements:
                                                    type: "check_box",
                                                    item_id: "HDat",
                                                    name: "Include Date",
                                                    variable_Name: "bUseDate",
                                                    type: "static_text",
                                                    item_id: "sta2",
                                                    name: "Format",
                                                    type: "popup",
                                                    item_id: "DFmt",
                                                    variable_Name: "strDateFormat",
                                                    width: 180,
                                                    height: 23,
                                                    char_width: 8,
                                            type: "view",
                                            align_children: "align_row",
                                            alignment: "align_fill",
                                            elements:
                                                    type: "static_text",
                                                    item_id: "sta1",
                                                    name: "Font:",
                                                    type: "popup",
                                                    item_id: "Font",
                                                    variable_Name: "strFontName",
                                                    width: 111,
                                                    height: 23,
                                                    char_width: 8,
                                                    type: "static_text",
                                                    item_id: "sta0",
                                                    name: "Font Size:",
                                                    alignment: "align_right",
                                                    font: "dialog",
                                                    type: "edit_text",
                                                    item_id: "FtSz",
                                                    variable_Name: "strFontSize",
                                                    width: 29,
                                                    height: 23,
                                                    type: "static_text",
                                                    item_id: "sta3",
                                                    name: "Color(8bit Hex RGB):",
                                                    alignment: "align_right",
                                                    font: "dialog",
                                                    type: "edit_text",
                                                    item_id: "FtCl",
                                                    variable_Name: "strFontColor",
                                                    width: 80,
                                                    height: 23,
                                                    char_width: 8,
                                    type: "cluster",
                                    item_id: "cls1",
                                    name: "Position",
                                    width: 188,
                                    height: 80,
                                    char_width: 8,
                                    char_height: 8,
                                    elements:
                                            type: "view",
                                            align_children: "align_top",
                                            elements:
                                                    type: "radio",
                                                    item_id: "PosL",
                                                    group_id: "PosH",
                                                    name: "Left",
                                                    variable_Name: "strHorzPos",
                                                    type: "radio",
                                                    item_id: "PosC",
                                                    group_id: "PosH",
                                                    name: "Center",
                                                    type: "radio",
                                                    item_id: "PosR",
                                                    group_id: "PosH",
                                                    name: "Right ",
                                                    type: "static_text",
                                                    item_id: "sta2",
                                                    name: " Margin (inches):",
                                                    type: "edit_text",
                                                    item_id: "MrgH",
                                                    variable_Name: "nMarginX",
                                                    char_width: 8,
                                            type: "view",
                                            align_children: "align_top",
                                            elements:
                                                    type: "radio",
                                                    item_id: "PosT",
                                                    group_id: "PosV",
                                                    name: "Top ",
                                                    variable_Name: "strVertPos",
                                                    type: "radio",
                                                    item_id: "PosM",
                                                    group_id: "PosV",
                                                    name: "Middle",
                                                    type: "radio",
                                                    item_id: "PosB",
                                                    group_id: "PosV",
                                                    name: "Bottom",
                                                    type: "static_text",
                                                    item_id: "sta2",
                                                    name: "Margin (inches):",
                                                    type: "edit_text",
                                                    item_id: "MrgV",
                                                    variable_Name: "nMarginY",
                                                    char_width: 8,
                                    type: "cluster",
                                    item_id: "cls3",
                                    name: "Page range",
                                    align_children: "align_row",
                                    elements:
                                            type: "radio",
                                            item_id: "rAll",
                                            group_id: "GRP1",
                                            name: "All",
                                            variable_Name: "strPgRangeSel",
                                            height: 20,
                                            type: "radio",
                                            item_id: "rCur",
                                            group_id: "GRP1",
                                            name: "Current (Applies only to Open Document)",
                                            height: 20,
                                            type: "radio",
                                            item_id: "rFro",
                                            group_id: "GRP1",
                                            name: "From:",
                                            width: 12,
                                            height: 24,
                                            type: "edit_text",
                                            item_id: "tFPg",
                                            variable_Name: "strStrtPg",
                                            height: 24,
                                            char_width: 6,
                                            type: "static_text",
                                            item_id: "sta1",
                                            name: "To:",
                                            height: 24,
                                            type: "edit_text",
                                            item_id: "tTPg",
                                            variable_Name: "strEndPg",
                                            height: 24,
                                            char_width: 6,
                                            type: "static_text",
                                            item_id: "sOfN",
                                            name: "of (N)          ",
                                            height: 24,
                            type: "view",
                            align_children: "align_row",
                            alignment: "align_fill",
                            elements:
                                    type: "ok_cancel",
                                    ok_name: "Apply",
                                    cancel_name: "Skip",
                                    type: "button",
                                    item_id: "But1",
                                    name: "Abort Process",
                                    type: "gap",
                                    item_id: "gap1",
                                    width: 210,
                                    height: 10,
                                    type: "static_text",
                                    item_id: "sta1",
                                    name: "version 1.2  11/5/2010",
                                    alignment: "align_right",
    var oDoc = event.target;
    if(typeof(oDoc.xfa) == "undefined")
        global.FileNameStamp.bHidden = oDoc.hidden;
        global.FileNameStamp.nNumPages = oDoc.numPages;
        if(!oDoc.hidden)
           global.FileNameStamp.nCurPage = oDoc.pageNum;
        global.FileNameStamp.strDocTitle = oDoc.info.title;
        global.FileNameStamp.strDocFileName = oDoc.documentFileName;
        var cRtn = global.FileNameStamp.DoDialog();
        if("ok" == cRtn)
            // Setup starting parameters
            var nPgStart, nPgEnd;
            var nTextSize = Number(global.FileNameStamp.strFontSize);
            var strLabel = global.FileNameStamp.strDocStamp.replace(/\n/g,"\r");
            // Get Font Color
            rgCol = /([\dabcdef]{2})([\dabcdef]{2})([\dabcdef]{2})/i;
            rgCol.test(global.FileNameStamp.strFontColor);
            var aFontCol = ["RGB", parseInt(RegExp.$1,16)/255,
                            parseInt(RegExp.$2,16)/255, parseInt(RegExp.$3,16)/255];
            switch(global.FileNameStamp.strPgRangeSel)
              case "rAll":
                nPgStart = 0;
                nPgEnd = oDoc.numPages -1;
                break;
              case "rCur":
                nPgEnd = nPgStart = oDoc.hidden?0:oDoc.pageNum;
                break;
              case "rFro":
                nPgStart = Number(global.FileNameStamp.strStrtPg)-1;
                if(nPgStart > (oDoc.numPages -1))
                  nPgStart = oDoc.numPages -1;
                nPgEnd = Number(global.FileNameStamp.strEndPg)-1;
                if(nPgEnd > (oDoc.numPages -1))
                  nPgEnd = oDoc.numPages -1;
                break;
               var nTextAlign,nHAlign,nVAlign;
               var nHMarg, nVMarg;
               var nMargX = Number(global.FileNameStamp.nMarginX) * 72;
               switch(global.FileNameStamp.strHorzPos)
                  case"PosL":
                    nTextAlign = app.constants.align.left; // Left Aligned Text
                    nHAlign = app.constants.align.left;
                    nHMarg = nMargX;
                    break;
                  case"PosC":
                    nTextAlign = app.constants.align.center;
                    nHAlign = app.constants.align.center;
                    nHMarg = 0;
                    break;
                  case"PosR":
                    nTextAlign = app.constants.align.right;
                    nHAlign = app.constants.align.right;
                    nHMarg = -nMargX;
                    break;
               var nMargY = Number(global.FileNameStamp.nMarginY) * 72;
               switch(global.FileNameStamp.strVertPos)
                  case"PosT":
                    nVAlign = app.constants.align.top;
                    nVMarg = -nMargY;
                    break;
                  case"PosM":
                    nVAlign = app.constants.align.center;
                    nVMarg = 0;
                    break;
                  case"PosB":
                    nVAlign = app.constants.align.bottom;
                    nVMarg = nMargY;
                    break;
             // Find and rename watermark;
             var aGs = oDoc.getOCGs();
             for(var i=0;aGs && (i<aGs.length);i++)
                if(aGs[i].name == "Watermark");
                   aGs[i].name = "Old_Watermark";
             try{
              //  Create watermark
              oDoc.addWatermarkFromText({cText:strLabel, nTextAlign:nTextAlign, cFont:global.FileNameStamp.strFontName,
                    nFontSize:nTextSize, aColor:aFontCol, nStart:nPgStart, nEnd:nPgEnd,
                    nHorizAlign:nHAlign, nHorizValue:nHMarg,
                    nVertAlign:nVAlign, nVertValue:nVMarg});
             }catch(e){
                app.alert("Error applying Label:\n" + e);
             // Find and rename watermark;
             var aGs = oDoc.getOCGs();
             for(var i=0;aGs && (i<aGs.length);i++)
                if(aGs[i].name == "Watermark");
                   aGs[i].name = "DocumentLabel";
                   break;
        else if(cRtn == "Abrt")
          event.rc = false;
    else
       if(3 == app.alert(oDoc.documentFileName + ": is a LiveCycle Form, which cannot be labeled\n\n Do you want to continue processing files? (Pressing No will Abort the file processing)",1,2))
         event.rc = false;

    There are a number of simpler ways to do this. Thom's Action is great, but sounds like it might be overkill for this. Text can be added a numer of ways, including a form field, text annotation, layer (aka Watermark, as with Thom's script), and stamp. It can also then be flattened so it gets converted to regular page contents, preventing the user from interacting with it and perhaps changing it. Which you choose depends on you needs. If you provide a bit more description, I could suggest a simpler script you can use.
    Also, please clarify exactly what you want included. Do you want just the file name (example.pdf), the file name without the extension (example), or the complete path (c:\dir1\dir2\example.pdf)?

  • How to add page count of PDF to the file name?

    I need help with an applescript that can look at a pdf, determine the page count in file and then add that value to the end of the file name in front of the .pdf
    ex.
    original name "map with pages4c.pdf"
    renamed "map with pages4c_48.pdf"
    Any help would be appreciated or suggestions on how this could be done.
    Thanks,
    John

    Hello
    That's quite simple.
    Just replace this chunk of code -
    tell application "Finder"
    set n to f's name
    set f's name to (n's text 1 thru -5) & "_" & p & ".pdf"
    end tell
    with -
    if 10 > p then set p to "0" & p
    tell application "Finder"
    set n to f's name
    set f's name to (n's text 1 thru -5) & "_" & p & ".pdf"
    end tell
    By the way, if there are 10000 files in directory tree, I'm afraid Finder is too slow to get files list. In order to avoid Apple Events timeout error, at least, replace this line -
    tell o to run
    with -
    with timeout of 3600 seconds
    tell o to run
    end timeout
    Or try the following script, which employs find(1) instead of Finder to get files list.
    All the best,
    Hiroto
    --SCRIPT3
    on run
    --main((choose folder with multiple selections allowed) as list)
    main((choose folder) as list)
    end run
    on open aa
    main(aa)
    end open
    on main(aa)
    (* list aa : list of folder aliases *)
    script o
    property ff : {}
    -- confirmation for safety
    set AppleScript's text item delimiters to {ASCII character 0}
    set aa to (aa as Unicode text)'s text items
    set AppleScript's text item delimiters to {""}
    set aa to (choose from list aa default items aa ¬
    with prompt ("You're renaming pdf files in following folder tree(s).") ¬
    with multiple selections allowed)
    if aa = false then error number -128
    -- process each folder
    set k to 0
    repeat with a in aa
    set a to a as alias
    -- get pdf files' POSIX path list (= ff)
    set ff to {}
    set sh to "find " & quoted form of POSIX path of a & " -type f -name \"*.pdf\" -print"
    try
    set t to (do shell script sh)
    on error
    set t to ""
    end try
    set px to count t's paragraphs
    set p0 to 1
    repeat -- in order to avoid stack overflow in getting large number of paragraphs at once
    set p1 to p0 + 3500
    if p1 ≥ px then set p1 to -1
    set ff to my ff & t's paragraphs p0 thru p1
    if p1 = -1 then exit repeat
    set p0 to p1 + 1
    end repeat
    if ff = {""} then set ff to {}
    -- process each pdf file
    repeat with f in my ff
    set f to f as POSIX file as alias
    tell application "Adobe Acrobat 7.0 Professional"
    --open f
    open f with invisible
    tell document 1
    set p to count pages
    close
    end tell
    end tell
    if 10 > p then set p to "0" & p
    tell application "Finder"
    set n to f's name
    set f's name to (n's text 1 thru -5) & "_" & p & ".pdf"
    end tell
    set k to k + 1
    end repeat
    end repeat
    -- decent notice
    tell application (path to frontmost application as string)
    display dialog ("Total of " & k & " pdf file(s) renamed successfully.") ¬
    with icon 1 giving up after 5
    end tell
    end script
    with timeout of 3600 seconds -- just in case
    tell o to run
    end timeout
    end main
    --END OF SCRIPT3
    Message was edited by: Hiroto (fixed typos)

  • Zero in file name

    Hello everybody!
    This is a problem: if I have the files with similar names - the only difference is how page number is stated, in 2 digits or in 1, (so with 0 or without) - my script sees those names as the same. Here is test script
    tell application "Finder"
    set theFold to choose folder
    set theFile to choose file
    set theName to name of theFile
    get every file of theFold whose name is theName
    end tell
    and I choose file with name ABBD060112_1Symons.pdf, but as a result I receive a list of 2 files, second - with name ABBD060112_01Symons.pdf.
    I tried different combinations and it looks like script is confuzed in case when 0 follows _. What goes wrong?
    Here is the end of event log:
    get name of alias "...........Desktop:tests:ABBD060112_1Symons.pdf"
    "ABBD060112_1Symons.pdf"
    get every file of alias "...........Desktop:tests:" whose name = "ABBD060112_1Symons.pdf"
    {document file "ABBD060112_01Symons.pdf" of folder "tests" of folder "Desktop" .... of startup disk, document file "ABBD060112_1Symons.pdf" of folder "tests" of folder "Desktop" .... of startup disk}
    end tell
    Thank you in advance for any suggestions
    Vera

    Hi Vera and welcome to Apple Discussions!
    I can confirm the same behaviour under 10.3.9. Looks like something badly wrong with Finder's implementation of "every file whose...". It wouldn't be the first time. And it's nothing to do with the underscore: it happens even if the files are named "1" and "01"
    If you do a brute-force comparison, it works:
    tell app "Finder"
    name of file "1" of thefold = name of file "01" of thefold
    --false
    end tell
    Possible solutions:
    * Loop through the list returned by "every file" and check each file name in turn against a condition, building a second list of files that match your test. It's slower but would appear to be more reliable.
    * A shell script. I can't help there, but others may be able to.
    Hope this helps,
    H

  • I can not download any files using Safari ? when I choose to download application file the URL include the file name and stop responding. Any help??

    I can not download any files using Safari ? when I choose to download application file the URL include the file name and stop responding. Any help??

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up a guest account” (without the quotes) in the search box.
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem(s)?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault in Mac OS X 10.7 or later, then you can’t enable the Guest account. The Guest login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    *Note: If FileVault is enabled under Mac OS X 10.7 or later, you can’t boot in safe mode.
    Test while in safe mode. Same problem(s)?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

  • Transferring iTunes to new computer... '?' in file names aborts copy?

    Hello,
    I've been trying to copy my iTunes library from my old computer (a very slow eMac G4/700 running OS X 10.3.9) to a new one. I've been following the directions as shown here:
    http://docs.info.apple.com/article.html?artnum=300173#next
    and the problem I seem to be having is that some of the songs have illegal characters such as '?' in the file names. Doesn't seem to bother iTunes when it comes to playing them, but OS X balks at copying said file, and aborts the whole copy process... and I have to go in and edit the file name, then start the copy all over again. Needless to say, it's more than slightly annoying by now.
    Are the modified file names going to cause a problem when I try to play the songs on the new computer? Is there an app that does batch file-name conversions just for this? I know there are a lot of apps that do file-name conversions... once the user gets all fluent in all the switches and options and whatnot, which seems like a wee bit of overkill if I can find something that just fixes them quick-like... I can't be the first person to have had this problem?
    Thanks,
    Monte

    I don't know of a quick fix. I have had the same problem and from the iTunes main window have edited the id3 tags to remove the offending characters. If you use the 'keep' option enabled then iTunes will rename the file on the HD to match the info in the 'name' column of iTunes.
    You can check Dougs Scripts at http://www.dougscripts.com/itunes/index.php and see if there is a script that can do the work for you.
    Now I make sure there are no offending characters in the song names.
    MJ

  • Changing the .chm File Name

    I know this topic has been covered before in the forum, but I a little bit slow and haven't quite understood the answers.  I am trying to change the name of the .chm file which resides at the root of the C: drive, but outside of the project folder.
    Several of the solutions refer to changing the name in the window properties, except I don't know what you are referring to by Window.  Is it on a dialog box such as Project Properties or is it something I'm totally unaware of?
    Sorry for the redundancy of the topic.

    Are you referring to the CHM file created when you compile your project? If so, all you need to do is right click on the Microsoft HTML Help single source layout and select Properties. The top field in this dialog - Select Output Folder and File Name - is where you specify the path to the CHM file and the actual file name. Change this to the reference the required file name (e.g. C:\Source\myfile.chm) and click Save. The next time you create your project output the file name will be as you have supllied.
    Read the RoboColum(n) for mutterings on RoboHelp, Technical Communication Suite and technical communication.

  • How do I change a file name of a photo

    I am new to the Mac and running Yoesomite. I wanted to know can I change the file name of a photo in iPhoto.  If not, then is the process to export the file to the desktop and then change the file name using cmd i.  I used to be able to do this in Windows easily but now I am not sure how to do this on a Mac.

    You can take the photo you need from iPhoto Library in Pictures. Click it with right mouse button and choose Show Package Contents. In that folder that opens, choose Masters and now you can find the photo that you needed, but it will take some time as there are many folders and some may be empty. Copy that photo to Desktop and do what you want from that point.
    Don't do that.
    It's utterly unnecessary, slow and difficult and worse, risks dataloss.
    Use the simple and supported ways.
    Export using File -> export, or use a Media Browser.
    When uploading to Wordpress there is no need to rename the file. Just upload it from the Media Browser (*see below) and you can title it in the Wordpress dialogue.
    *For help accessing your photos in iPhoto see this user tip:
    https://discussions.apple.com/docs/DOC-4491

  • Can I partially change appearance on a file name?

    I´m working with a big company that has quite a few articles that I´m making individual originals for. Since the customer always refers to the products by name, I need to start the file names with the description. At the end of the file name I add the serial number for my business system.
    When i browse the windows the article numbers is hard to see because the file names are individual in lenght, and is not in a numerical sequence (alphabetical sorting) Is there any way to colorize or make just the numbers bold in the file name? Or does anyone have another idea of what to do?
    Sincerly 
    Perra
    Message was edited by: perrafromvarberg

    Finder uses a volume's  Spotlight index for its searches, and Spotlight won't create such an index on a Windows server. EasyFind is slower, but I think it still works remotely.
    I tried creating a local file named "testfile98765.txt", and then searched in EasyFind for *98765* after choosing "Unix-Wildcards" as the search operator (an asterisk matches anything). EasyFind found the file, which I could then either double-click to open directly from EasyFind, or else use ctrl-click>Reveal in Finder.

  • Copy full file path+file name in Midnight Commander

    Hi!
    How can I copy a file's full path with the file name in Midnight Commander?
    If I press Ctrl+Alt+Enter it's shows this to me in the command line but I can't copy this route.
    If I mark a file with 'Insert' and than if I would like to paste this for example in Mousepad or any other text editor with Shift+Insert or Ctrl+V it isn't works.
    (Relatively newbie sitting here so if the answer is complicated please write a step-by-step instruction )

    Well,I did a lot of research on the internet and I found the best solution.
    - choose the file,press 'Ctrl' + 'Shift' + 'Enter'
    - after that you can see the full file path + the file name in the command line (bottom of the screen)
    - Select the text with 'Shift' + 'Mouse Left Click' (drag it across the whole command)
    - For copy the text, press 'Ctrl' + 'Insert'
    - For paste, press 'Shift' + 'Insert'
    This is still pretty damn slow,I wanted to do it with a single key combination while the file is selected but it looks impossible.
    But at the same time I have started to use Ranger file manager which is also runs from terminal,extremely fast,easy to use and if I press 'Ctrl' + 'Insert' on a file it is copies the full path with the name of the file itself. Just perfect.
    I won't mark the thread [SOLVED] because if anybody knows a better method for this in Midnight Commander (with a script or whatnot) maybe will write it down for us. I hope...

  • Whats a duplicate file name?

    OKay so since I tried last night to sync my ipod I am having the worst two days! Everything that can possibly go wrong is. After gettting an error on almost every song in my library, and my ipod being wiped of every file on it, its now telling me it cant be synced due to a duplicate file name. WHat the heck does that mean?

    I had a similar problem. About two days before I got this error started getting the strange message from Windows that my USB connection was slow and I should use a USB connection to speed up the transfer. Same connection I've always plugged into.
    Then after I got the duplicate file, can't sync error, suddenly Windows wants to either run scandisk or format the iPod.
    I finally tried doing the Restore to factory settings button for the iPod from the iTunes window and then iTunes would not recognize the iPod and the iPod showed no files stored on it. Under the Settings/About window it still showed 86 gb used as "other", but no music, video or photos.
    Now it is sent off for repair under my Best Buy service contract that ends next January (thank God) and I'll get another refurbished one in 3-5 days.
    FYI

Maybe you are looking for