Request to modify the script to collect the CPU Ready in percentage by VM instead of milliseconds

Hi all

I would ask for help here with the script that I found in this forum by Mr. LucD to collect % VM CPU ready to be changed according to the famous formula for calculating the percentage of CPU of VM ready:

((Valeur de sommation UC / (< intervalle de mise à jour par défaut graphique en secondes > * 1000)) * 100) / number of vCPU = CPU % ready



From my understanding, the script must be changed because:

  1. Don't divide the percentage CPU Ready by the number of vCPU for each virtual computer
  2. The refresh interval is not set 'for a week. for simplicity, this script will be used to collect last week performance data ($start = (Get-Date). AddDays(-7))

Note: The refresh rate can be found this KB: VMware KB: conversion between the summation of values CPU and CPU ready %

the purpose of this script is to classify VM of the result is greater than 10% determined as having problems with CPU Ready. Article source: http://docs.media.bitpipe.com/io_10x/io_107330/item_605784/Basic%20VMware%20vSphere%20Performance%20Guide_201211.pdf)

I have tested and run script below:

$allvms = @()
$vms = Get-VM  
$start = (Get-Date).AddDays(-7)
$metrics = "cpu.usage.average","mem.usage.average","cpu.ready.summation" 


Get-Stat -Entity $vms -Start $start -Stat $metrics | 
Group-Object -Property {$_.Entity.Name} | %{
  $cpu = $_.Group | where {$_.MetricId -eq "cpu.usage.average" -and $_.Instance -eq ""} | Measure-Object -Property value -Average -Maximum -Minimum
  $mem = $_.Group | where {$_.MetricId -eq "mem.usage.average"} | Measure-Object -Property value -Average -Maximum -Minimum
  $vmstat = "" | Select Time,VmName, MemMax, MemAvg, MemMin, CPUMax, CPUAvg, CPUMin, CPURDYMaxPercent
  $vmstat.VmName = $_.Group[0].Entity.Name
  $vmstat.Time = $_.Group | Sort-Object -Property Timestamp | Select -First 1 | Select -ExpandProperty Timestamp
  $vmstat.CPUMax = [Math]::Round($cpu.Maximum,2)
  $vmstat.CPUAvg = [Math]::Round($cpu.Average,2)
  $vmstat.CPUMin = [Math]::Round($cpu.Minimum,2)
  $vmstat.MemMax = [Math]::Round($mem.Maximum,2)
  $vmstat.MemAvg = [Math]::Round($mem.Average,2)
  $vmstat.MemMin = [Math]::Round($mem.Minimum,2)
  $vmstat.CPURDYMaxPercent = &{
  $interval = $_.Group[0].IntervalSecs * 10
    ($_.Group | where {$_.MetricId -eq "cpu.ready.summation" -and $_.Instance -eq ""} | 
  Sort-Object -Property Value -Descending |
    Select -First 1 | 
    Select -ExpandProperty Value) / $interval
  }
  $allvms += $vmstat
}
$allvms | Select Time,VMName, MemMax, MemAvg, MemMin, CPUMax, CPUAvg, CPUMin, CPURDYMaxPercent | 
Export-Csv "C:\TEMP\AllVMs-7days.csv" -noTypeInformation -UseCulture 

I hope that this will be the most useful script to understand where particular VM is experiencing problem with percentage CPU Ready.

Thanks in advance,

I have my version here, I use to use of the CPU.

{Function Get-Ready

<>

. LOGBOOK

This unique feature provide several reports and information. IE: convert ready value into a readable format (for real-time, day, week, month, year).

. DESCRIPTION

This unique feature provides multiple information of esxi host, as the list below.

The CPU usage of the virtual, Mhz, the use of the processor CPU ready computer

vCPU allocated to the VM (jailbroken in the casings and core)

VMHost name

Information physical VMhost CPU (jailbroken in the casings and core)

To convert between value of CPU ready summons in vCenter performance tables and the value of loan % of CPU that you see in esxtop, you must use a formula.

The form requires that you know the default update intervals for performance dashboards. These are the default update for each chart intervals:

Realtime: 20 seconds

Last day: 5 minutes (300 seconds)

Last week: 30 minutes (1800 seconds)

Over the past month: 2 hours (7200 seconds)

Last year: 1 day (86400 seconds)

To calculate the % of CPU ready of the summation value ready CPU, use this formula:

(Value of summons UC / ( * 1000)) * 100 = ready % CPU

Example: Stats in real-time for a VM on vCenter may have an average CPU ready summation value of 1000. Use the appropriate formula values to get the loan % of CPU.

(1000 / (20 sec * 1000)) * 100 = 5% CPU ready

For more information on vmware 2002181 KB

. VM PARAMETER

Name of the virtual machine

. ENTRIES

String.System.Management.Automation.PSObject.

. OUTPUTS

None.

. EXAMPLE OF

If you wrap this script inside the function you can use it as a command.

To encapsulate this script

PS > Get-VMHost esxihost.fqdn | Get ready

Report back for perticular VMHost vm

. NOTES

To view examples, type: "get-help Set-VMHostSSH-examples.

For more information, type: "get-help Set-VMHostSSH-detailed".

For technical information, type: "get-help Set-VMHostSSH-full".

http://kunaludapi.blogspot.com

#>

[CmdletBinding()]

(param

[Parameter (Mandatory = $true, ValueFromPipeline = $True, ValueFromPipelineByPropertyName = $true)]

([String] $Name) #param

BEGIN {#begin}

{in process

$Stattypes = "cpu.usage.average", "cpu.usagemhz.average", "cpu.ready.summation".

foreach ($esxi in $(Get-VMHost $Name)) {}

$vmlist = $esxi | Get - VM | Where-Object {$_.} PowerState - eq "Receptor"}

$esxiCPUSockets = $esxi. ExtensionData.Summary.Hardware.NumCpuPkgs

$esxiCPUcores = $esxi. ExtensionData.Summary.Hardware.NumCpuCores/$esxiCPUSockets

$TotalesxiCPUs = $esxiCPUSockets * $esxiCPUcores

{foreach ($vm to $vmlist)

$VMCPUNumCpu = $vm. NumCpu

$VMCPUCores = $vm. ExtensionData.config.hardware.NumCoresPerSocket

$VMCPUSockets = $VMCPUNumCpu / $VMCPUCores

$GroupedRealTimestats = get-Stat-entity $vm - $Stattypes - Instance-Realtime Stat ' "-ErrorAction SilentlyContinue | MetricId Group-Object

$RealTimeCPUAverageStat = '{0:N2}' f $($GroupedRealTimestats |) Where {$_.} Name - eq "cpu.usage.average"} | Select-Object - ExpandProperty group | Measure-object-value average | Select - Object - ExpandProperty average)

$RealTimeCPUUsageMhzStat = '{0:N2}' f $($GroupedRealTimestats |) Where {$_.} Name - eq "cpu.usagemhz.average"} | Select-Object - ExpandProperty group | Measure-object-value average | Select - Object - ExpandProperty average)

$RealTimeReadystat = $GroupedRealTimestats | Where {$_.} Name - eq "cpu.ready.summation"} | Select-Object - ExpandProperty group | Measure-object-value average | Select-Object - ExpandProperty average

$RealTimereadyvalue = [math]: tour ($(($RealTimeReadystat / (20 * 1000)) * 100), 2)

$Groupeddaystats is entity-Stat-get $vm - Stat $Stattypes - beginning (get-date). AddDays(-1)-done (get-date) - IntervalMins 5 - Instance ""-ErrorAction SilentlyContinue | MetricId Group-Object

$dayCPUAverageStat = '{0:N2}' f $($Groupeddaystats |) Where {$_.} Name - eq "cpu.usage.average"} | Select-Object - ExpandProperty group | Measure-object-value average | Select - Object - ExpandProperty average)

$dayCPUUsageMhzStat = '{0:N2}' f $($Groupeddaystats |) Where {$_.} Name - eq "cpu.usagemhz.average"} | Select-Object - ExpandProperty group | Measure-object-value average | Select - Object - ExpandProperty average)

$dayReadystat = $Groupeddaystats | Where {$_.} Name - eq "cpu.ready.summation"} | Select-Object - ExpandProperty group | Measure-object-value average | Select-Object - ExpandProperty average

$dayreadyvalue = [math]: tour ($(($dayReadystat / (300 * 1000)) * 100), 2)

$Groupedweekstats is entity-Stat-get $vm - Stat $Stattypes - beginning (get-date). AddDays(-7)-done (get-date) - IntervalMins 30 - Instance ""-ErrorAction SilentlyContinue | MetricId Group-Object

$weekCPUAverageStat = '{0:N2}' f $($Groupedweekstats |) Where {$_.} Name - eq "cpu.usage.average"} | Select-Object - ExpandProperty group | Measure-object-value average | Select - Object - ExpandProperty average)

$weekCPUUsageMhzStat = '{0:N2}' f $($Groupedweekstats |) Where {$_.} Name - eq "cpu.usagemhz.average"} | Select-Object - ExpandProperty group | Measure-object-value average | Select - Object - ExpandProperty average)

$weekReadystat = $Groupedweekstats | Where {$_.} Name - eq "cpu.ready.summation"} | Select-Object - ExpandProperty group | Measure-object-value average | Select-Object - ExpandProperty average

$weekreadyvalue = [math]: tour ($(($weekReadystat / (1800 * 1000)) * 100), 2)

$Groupedmonthstats is entity-Stat-get $vm - Stat $Stattypes - beginning (get-date). AddDays(-30)-done (get-date) - IntervalMins 120 - Instance ""-ErrorAction SilentlyContinue | MetricId Group-Object

$monthCPUAverageStat = '{0:N2}' f $($Groupedmonthstats |) Where {$_.} Name - eq "cpu.usage.average"} | Select-Object - ExpandProperty group | Measure-object-value average | Select - Object - ExpandProperty average)

$monthCPUUsageMhzStat = '{0:N2}' f $($Groupedmonthstats |) Where {$_.} Name - eq "cpu.usagemhz.average"} | Select-Object - ExpandProperty group | Measure-object-value average | Select - Object - ExpandProperty average)

$monthReadystat = $Groupedmonthstats | Where {$_.} Name - eq "cpu.ready.summation"} | Select-Object - ExpandProperty group | Measure-object-value average | Select-Object - ExpandProperty average

$monthreadyvalue = [math]: tour ($(($monthReadystat / (7200 * 1000)) * 100), 2)

$Groupedyearstats is entity-Stat-get $vm - Stat $Stattypes - beginning (get-date). AddDays(-365)-done (get-date) - IntervalMins 1440 - Instance ""-ErrorAction SilentlyContinue | MetricId Group-Object

$yearCPUAverageStat = '{0:N2}' f $($Groupedyearstats |) Where {$_.} Name - eq "cpu.usage.average"} | Select-Object - ExpandProperty group | Measure-object-value average | Select - Object - ExpandProperty average)

$yearCPUUsageMhzStat = '{0:N2}' f $($Groupedyearstats |) Where {$_.} Name - eq "cpu.usagemhz.average"} | Select-Object - ExpandProperty group | Measure-object-value average | Select - Object - ExpandProperty average)

$yearReadystat = $Groupedyearstats | Where {$_.} Name - eq "cpu.ready.summation"} | Select-Object - ExpandProperty group | Measure-object-value average | Select-Object - ExpandProperty average

$yearreadyvalue = [math]: tour ($(($yearReadystat / (86400 * 1000)) * 100), 2)

$data = New-Object psobject

$data | Add-Member - MemberType NoteProperty-VM name-value $vm.name

$data | Add-Member - MemberType NoteProperty-name VMTotalCPUs-value $VMCPUNumCpu

$data | Add-Member - MemberType NoteProperty-name VMTotalCPUSockets-value $VMCPUSockets

$data | Add-Member - MemberType NoteProperty-name VMTotalCPUCores-value $VMCPUCores

$data | Add-Member - MemberType NoteProperty-Name ' in time real average usage % "-value $RealTimeCPUAverageStat

$data | Add-Member - MemberType NoteProperty-name "Mhz real-time use" - value $RealTimeCPUUsageMhzStat

$data | Add-Member - MemberType NoteProperty-Name "loans in time real %"-value $RealTimereadyvalue

$data | Add-Member - MemberType NoteProperty-name ' day average use % "-value $dayCPUAverageStat

$data | Add-Member - MemberType NoteProperty-name of the "day use Mhz"-value $dayCPUUsageMhzStat

$data | Add-Member - MemberType NoteProperty-Name "ready day %"-value $dayreadyvalue

$data | Add-Member - MemberType NoteProperty-"week average use name% '-value $weekCPUAverageStat

$data | Add-Member - MemberType NoteProperty-Name "week use Mhz"-value $weekCPUUsageMhzStat

$data | Add-Member - MemberType NoteProperty-"week loan name% '-value $weekreadyvalue

$data | Add-Member - MemberType NoteProperty-' months average use name% '-value $monthCPUAverageStat

$data | Add-Member - MemberType NoteProperty-Name "month use Mhz"-value $monthCPUUsageMhzStat

$data | Add-Member - MemberType NoteProperty-' months loan name% '-value $monthreadyvalue

$data | Add-Member - MemberType NoteProperty-name ' year average use % "-value $yearCPUAverageStat

$data | Add-Member - MemberType NoteProperty-name ' year use Mhz "-value $yearCPUUsageMhzStat

$data | Add-Member - MemberType NoteProperty-Name "ready year % '-value $yearreadyvalue

$data | Add-Member - MemberType NoteProperty - name VMHost-$esxi.name value

$data | Add-Member - MemberType NoteProperty-name VMHostCPUSockets-value $esxiCPUSockets

$data | Add-Member - MemberType NoteProperty-name VMHostCPUCores-value $esxiCPUCores

$data | Add-Member - MemberType NoteProperty-name TotalVMhostCPUs-value $TotalesxiCPUs

$data

} #foreach ($vm in $vmlist)

} #foreach ($esxi in $(Get-VMHost $Name))

} #process

} #Function-prepare you

Get-VMHost | Get ready

Tags: VMware

Similar Questions

  • How to calculate the CPU Ready on Cluster DRS via Powercli?

    Hi all!

    I have a DRS Vsphere cluster. I want to know what is the value of the loan of CPU I have in my group.

    For example, I get 20% of powercli value, it is normal for the cluster, but if I have 100% or more, I have a problem.

    How to achieve via Powercli? And how to calculate the percentage values correctly?

    I know, I can get all values of CPU Ready of VMs cluster, but IT is not the same thing, I need overall value of CPU Ready.

    Thanks in advance!

    As far as I know you can get the cpu.ready.summation for ESXi nodes or VMs.

    For a cluster, you will need to get the value of each node in the cluster ESXi and then take the average.

    The metric cpu.radey.summation is expressed in milliseconds.

    To get a percentage, you need to calculate the percentage of loan period during the interval during which it was measured.

    Something like this (this will give the loan current %)

    $clusterName = "mycluster.

    $stat = "cpu.ready.summation".

    $esx = get-Cluster-name $clusterName | Get-VMHost

    $stats = get-Stat-entity $esx - Stat $stat - Realtime - MaxSamples 1 - forum «»

    $readyAvg = $stats | Measure-object-property - average value. Select - ExpandProperty average

    $readyPerc = $readyAvg / ($stats [0].) IntervalSecs * 1000)

    Write-Output "Cluster $($clusterName) - CPU % loan $(' {0:p}'-f $readyPerc).

  • Need help to modify the Script to find the number of vCPU and reservation of memory in VC

    Hello

    Need help to modify the script so that his can person report to the vc all focus level instead of each level of the Cluster.

    Thank you

    KR

    Try this instead:

    $vmsInfo = Get-VM
    #Creating array to place new object
    
    $reportdata = @()
    
    Foreach ($vm in $vmsInfo)
    {
    #Creating new object
    $vmInfo = "" | Select Name, CPUReservationMHz, MemoryReservationGB
    $vmInfo.Name = $vm.Name
    $vmInfo.CPUReservationMHz = $vm.ExtensionData.ResourceConfig.CpuAllocation.Reservation
    $vmInfo.MemoryReservationGB = $vm.ExtensionData.ResourceConfig.MemoryAllocation.Reservation / 1024;
    #Inserting data into new object.
    $reportdata += $vminfo
    }
    $reportdata
    
  • What makes "modify the Collection published"?

    If I right click on a published collection there is a command 'modify the Collection published.  In the dialog box that appears, it seems the only thing I can do is to rename, but there are already a name change from the context menu.  Hit to CHANGE them in the dialog box seems to do nothing.  What Miss me about the use of this command.  It doesn't seem to be any info on it in a google search.

    Screen Shot 2014-02-16 at 1.01.50 PM.png

    It depends entirely on the plugin which lies behind that published service, Bob. The usual thing would be to encode the plugin so that the menu option opens a dialog box with the settings associated with this service.

    For example, imagine that the plugin's download shoots to a printing service. Edit can produce a dialog box which gets the info from the service (for example, standard prices) and allows you to add your profit margin or the uprising. When you close the dialog box that the information is stored in the catalog and sent to the service.

    So Edit can do all sorts of things and it is not surprising that Google may not provide any obvious answer.

    John

  • Modify the script to fix different MovieClips

    I need to find a way to modify this code to be able to upload clips of different film instead of 100 of the same thing. The idea is to make a nav of this. Then I want to only load one, 'tree'... so I want to set a different clip to staging another fixed x, y, z value.

    The script that I have is:

    var numTrees:Number = 10;
    var fl:Number = 250;
    var gravity: Number =. 5;
    var vx:Number = 0;
    var vy:Number = 0;
    var vz:Number = 0;
    var friction: Number =. 98;
    var vpX:Number = Stage.width / 2;
    var vpY:Number = Stage.height / 2;

    init();
    function init() {}
    for (var i: Number = 0; i < numTrees; i ++) {}
    var tree: MovieClip = attachMovie ("tree", "tree" + I, i);
    Tree.x = Math.Random () * 2000-1000;
    Tree.y = 50;
    Tree.z = Math.Random () * 10000;
    }
    }

    function onEnterFrame (): Void {}
    If (Key.isDown (Key.up))
    {
    VZ-= 1;
    }
    another if (Key.isDown (Key.DOWN))
    {
    VZ += 1;
    }
    If (Key.isDown (Key.Left))
    {
    VX += 1;
    }
    another if (Key.isDown (Key.RIGHT))
    {
    VX-= 1;
    }
    If (Key.isDown (Key.Space))
    {
    Vy += 1;
    }
    Vy = gravity;
    VX * = friction;
    Vy * = friction;
    VZ * = friction;
    for (var i: Number = 0; i < numTrees; i ++) {}
    var tree: MovieClip = this ['tree' + i];

    Tree.x += vx;
    Tree.y += vy;
    Tree.z += vz;
    If (Tree.y < 50)
    {
    Tree.y = 50;
    Vy = 0;
    }
    If (tree.z < = - fl) {}
    Tree.z += 10000;
    }
    ElseIf (tree.z > 10000 - fl)
    {
    Tree.z-= 10000;
    }
    var scale: Number = fl / (fl + tree.z);
    Tree._xscale = tree._yscale = scale * 100;
    Tree._x = vpX + tree.x * scale;
    Tree._y = vpY + tree.y * scale;
    Tree._alpha = scale * 60 + 40;
    tree.swapDepths(-tree.z);
    }
    }

    You are welcome.

  • Modify the script for multiple virtual machines

    I'm working on the powercli user to change the CPU and the memory of several virtual machines.

    I found the perfect scenario created: http://ict-freak.nl/2010/05/07/powercli-script-to-schedule-memory-and-or-vcpu-updowngrade/comment-page-1/#comment-20336

    But it's only for 1 VM.

    Can someone tell me to change so do several virtual machines.  A text file would be ideal, but I'm ready for anything as this point, nothing I try does not work.

    Thank you.

    You could do

    foreach ($vm in Get-VM-name (Get-Content:\Powercli_scripts\servers.txt))

    I don't know why it's poweroffs randomly.

    You can add the - WhatIf parameter on this line, like that it will only say what he does, without actually running the cmdlet.

  • How to fix problem with error 1321. The installer has insufficien privileges to modify the file C:\Program Adobe 8.0\Resource\Linguistics\Providers\Proximity\can129.lex

    Error 1321. The installer has insufficien privileges to modify the file C:\Program Adobe 8.0\Resource\Linguistics\Providers\Proximity\can129.lex

    I also get error 1607 when you try to download a new driver for Xerox Travel scanner 100. HHHHHEEEEELLLLLPPPPPP!

    Hello

    1. did you of recent changes on the computer?

    2. when exactly you receive the 1321 error?

    3. do you have security software installed on the computer?

    See the article and try the steps mentioned to fix the 1321 error.

    Error 1321 or 1309 | Install | CS4, CS5 |

    http://kb2.Adobe.com/CPS/403/kb403915.html

    You may receive a "1607: unable to install InstallShield Scripting runtime" error message when you try to install the software in Windows XP

    http://support.Microsoft.com/kb/888019

  • Photosmart 6520: Trying to find the Code of 'request' to record the HP printer connected.

    Printer Photosmart 6520 of is (and works perfectly), allows to print emails ok phone mobile, as the e-mail address of the printer (HP eprint one), but not able to record my printer on the HP connected site as unable to find the Code for "request".

    Have followed the instructions from HP to "Print report" and ran every possible piece of information apart from the "request Code".

    Can only guess that previously while modifying the HP eprint address and making it more user-friendly, I already activated and used the claim Code?

    I would like to fix this, so I can add a printer and display the record of the emails sent for printing.

    Appreciate any advice.

    Thank you very much.

    Hello

    The claim code to customize your ePrint address, which means that it's already been claimed and is no longer valid.

    In order to obtain a valid claim code, you will need to disable web services and reactivate, however, that means that you must select a different ePrint for the printer address, the current will not be available.

    To do this, click the Web Services and select settings, then select delete the Web Services.

    Open the Web Services option again and follow the steps to reactivate, an information sheet will include the new claim code.

    Then you can add it to the connected HP and select a new personalized email

    Kind regards

    Shlomi

  • Modify the files in Stack.jsx

    I'm new to scripting Photoshop so I'm sorry if this has already been answered, but I can't seem to find the answer or understand it.   I write a script that does an INCLUDE using the Photoshop script load files in Stack.jsx.  This script seems to name the layers the file name.  I would like to know how to modify this script to not include the file name in the layer and just put the layer 1, Layer 2.  Any help would be greatly appreciated.

    JJMack - with your suggestion, I was able to get the script to work.  Thanks for the great idea.  Sometimes it takes just to walk back for a minute to see another solution.  Thanks again!

  • Modify the file Listener (listener.ora) to remove PASSWORDS

    Oracle 10.2.0.4
    64 bit SPARC Solaris 10.5

    We have our listener that is locked by password user authentication. As Oracle has recommended, should not the authentication of users, leading to the decision to withdraw the following:
    #---15: 38:18 - ADDED BY TNSLSNR October 29, 2007
    PASSWORDS_MYDB = 8E28G2195BB5339
    SAVE_CONFIG_ON_STOP_MYDB = WE
    #--------------------------------------------
    My Solution:
    1 stop listener < nom_recepteur > and change the lines above in the listener.ora file
    2. start receiver < nom_recepteur >
    NOTE: This must be done via a shell script.


    Question:
    1. the solution above will make the listener authentication OS again?
    2 does the script below make sense?
    #! / bin/bash
    # Modify the listener to use only the OS authentication
    CD $HOME
    . . / mydb
    CD $ORACLE_HOME/network/admin
    CP listener.ora listener_'date of +%Y-%m-%m'.ora
    CP tnsnames.ora tnsnames_'date of +%Y-%m-%m'.ora
    Lsnrctl set of password $instanceName
    $instanceName lsnrctl stop
    SED EI "/ PASSWORDS_/d ' EI ' / SAVE_CONFIG_ON/d ' e ' / #-/ d ' listener_' day +%Y-%m-%m'.ora > listener.ora
    lsnrctl start $instanceName
    echo "Listener $instanceName update"
    echo "* mydb.sh is complete * '
    I'm more worried about 7th line, where the password is defined. I would appreciate any help with the password that passes to the listener via the script

    Yes, the listener returns to OS authentication if you remove the "PASSWORDS_MYDB =" line of listener.ora and then bounce the listener. You can check this by using a 'lisnrctl status' command before and after the rebound. "Judge of what happens to a test on one of my listeners, while the listener is password protected" lsncrtl status "should show the line

    Security                  ON: Password or Local OS Authentication
    

    After removing the listener.ora password and restart the listener, this should change to

    Security                  ON: Local OS Authentication
    

    Published by: karluk may 11, 2011 09:23

  • Need help to modify the Javascript code...

    Hello world

    We have the batch script to create InDesignCS2 PS files. We got this script from adobe only forums. And his works fine. Now, I am creating the batch script to create PDF files. Almost, I modified the script, but in the step-exporter script shows an error inside. I tried but unable to solve the problem. I have attached the cliché and find the script below.

    //--------------------------------
    #target indesign4-0
    var myFolder = Folder.selectDialog ("Please select the data in the entry InDesign files");
    var myFileIn = File (myFolder) .getFiles ("*.indd");
    var myFileOut = Folder.selectDialog ("Please select the Out put PDF file");
    var params = new Array();
    params = getData (myFolder, myFileIn);
    app.dialogs.everyItem () .destroy ();
    Opens();

    function getData (PDF)
    {
    var pdfPresets = app.pdfExportPresets.everyItem () .name;
    Dlg var = app.dialogs.add ({name: 'Choose the Style'});
    with (DLG)
    {
    with (dialogColumns.add ())
    {
    with (borderPanels.add ())
    {
    staticTexts.add ({staticLabel: "PDF presets:', minWidth: 93});
    dropDown = dropdowns.add ({stringList: pdfPresets, selectedIndex: 0});
    }
    }
    }
    If (dlg.show () == false) {}
    DLG. Destroy();
    Exit (0);
    }
    Return dropDown.selectedIndex;
    }

    function Opens()
    {
    for (var i = 0; i < myFileIn.length; i ++) {}
    var myDoc = app.open (myFileIn [i], true);
    var end = new Array();
    var myFileInPath = myDoc.filePath;
    var PDFs = new Folder (myFileOut);
    pdfUsing (params, PDFs, ".pdf");
    myDoc.close (SaveOptions.NO);
    }
    }

    function pdfUsing (presetName, folderPath, fileExt)
    {
    var targFolder = new Folder (folderPath);
    try {}
    .pdfExportFile app.pdfExportPresets.item (presetName) = new file (targFolder.fsName + "/" + app.activeDocument.name.split (".indd") [0] + fileExt);
    app.activeDocument.pdfExport (ExportFormat.pdfType, false, app.pdfExportPresets.item (presetName));
    } catch (e) {}
    Alert (' error in pdfUsing: "+ e)
    }
    }

    Alert ("completed");

    //--------------------------------

    Please see this and help for me. Thanks in advance

    Indana

    Hi John,.

    You want to use the method "exportFile", not "export" (that's a word reserved in JavaScript), and not "exportPDF" (which does not appear as a method of the document object - that you will notice if you look at the document object in the ExtendScript Toolkit object model viewer).

    Thank you

    OLE

  • How to remove the link "Request itself" from the login page

    Hi all, I want to remove the link "Request itself" from the login page. It is not a menu item. So how can I remove it? Any ideas?

    Go to the System Configuration in Console Design

    Search authorized registration and XL. SelfRegistrationAllowed it is wrong. No need to modify the JSP

  • IOM: Manager request access to the subordinate

    I have a requirement that managers should be able to request access to resources for their subordinates. OOTB, users can only free resources request and admin can provide resources to others. I can think of a way

    All managers is part of a group of IOM.
    Give the necessary menu group and permissions to "grant" resource.

    I hope that the details of resource objects can be filled by the same manager in this case, because it must be mapped to process details. I don't know how I'm going to add all managers to one group well IOM and with change management, this does not sound like a great way to go about it. In addition, Manager must be "ideally" able to request access to only his subordinates, what will not happen to the approach described above.

    Is there a way to do this? Please let me know

    Thank you.

    Here are three slightly different approaches which require too much customization -
    1. instead of create a new jsp just modify the jsp (tjspRequestVerificationTiles.jsp I think) "not allowing users to submit the application for other users. Therefore, write a few lines of code to check that the user is infact the Manager. In this approach, managers will be able to see all the users can choose their but will finally be rejected to create a request.
    2. create an approval workflow where if someone else (other than User Manager) has requested approval will go to the User Manager. In this approach eventhough other managers are able to ask of other subordinates, but the resource will not be put into service without the approval of actual carriers.
    3. create an approval workflow where if someone else (other then User Manager) asked, while the application is dismissed. So even if an unauthorized user has asked for one, but this request will not go anywhere. You can also send a notification to the user you attempted an unauthorized application.

  • I want to back up why iMovie on an external hard drive and.  retain the ability to modify the backup version

    I want to back up why iMovie on an external hard drive and.  retain the ability to modify the backup version. Thank you for helping me best wishes, Garvin Bazzell "Bazz.

    You can in the finder copy your library to EHD. Make sure that the EHD are formatted OS Extended journaled. Open the library in iMovie to make sure that it copied correctly.

  • When going through the process of downloading with social monkee and reach the point add it to firefox, I get the following message: "social Monkee cannot be installed because firefox is unable to modify the required." How can this be repaired?

    When going through the process of downloading with social monkee and reach the point add it to firefox, I get the following message: "social Monkee cannot be installed because firefox is unable to modify the required." How can this be repaired?

    Which is usually caused by a lack of unpacking the directive (< em: unzip > true < / em: unzip >) in the file install.rdf to this extension.

    See https://developer.mozilla.org/En/Updating_extensions_for_Firefox_4.0#XPI_unpacking

Maybe you are looking for

  • TDSErrNotTdsFile(-2503)

    Hello I generated a .tdms file and when I tried to open it in DIAdem I get the following error. I tried using the repair of PDM tool, but I can't open the file I use DIAdem 2012. I tried downloaded a copy of the data in the file however it may be too

  • sbRIO-9626 driver

    Hello world I want to simulate my program on the host PC before buying the sbRIO-9626, in order to be sure of sufficient space on the FPGA necessary for my program. But when I want to create a new FPGA VI under 'My Computer', first of all, there is n

  • the volume on the hs status bar icon missing

    The volume icon which allowed me to mute or increase the volume was still on the shelf next to the time, but now all of a sudden ite disappeared

  • Vista does not START, the keyboard does not work.

    My power went out and when I turned on my PC, it says that the keyboard is disabled. I can't boot without a keyboard menu. I put the Vista Home Premium to reinstall disk in and nothing changes, it's still a black screen that says that the keyboard is

  • Cannot get rid of the 'dll' during computer startup problem

    Whenever the computer is started, I get the following error message: Run DLLS There is a problem starting TaskSchedulerHelper.dll the specific module could not be found. I searched on the window support pages, articles and a few corrections.  I run d