need help to run a script from cron
Here's what I'm trying to get running (not the script complete, but all I need for this example):
#! / bin/sh
esxcfg-info - s & gt; /tmp/info.txt
output
This script works from the command line and info.txt is filled with loads of data. If I run it from cron, I don't get any errors, but the file has no data (0KB).
I run other scripts of shell cron with no problems, but they are not call esxcfg orders. I guess that's because cron does not run as root as I am from the command line. Can anyone help to get this shell script to run or what do I need to get cron to complete (perhaps as root)? I don't want examples of perl, that my shell script is much more and I'm not a perl programmer, so I does the conversion.
Thank you!
You must specify the path complete the command that you try to run or any other entry Besides, since the projected TRACK can not set when the cron job started.
who can help you locate that
[root@himalaya Devastator-2009-05-22--2]# which esxcfg-info /usr/sbin/esxcfg-info
=========================================================================
William Lam
VMware vExpert 2009
Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/
VMware Code Central - Scripts/code samples for developers and administrators
If you find this information useful, please give points to "correct" or "useful".
Tags: VMware
Similar Questions
-
Hi guys,.
My client is trying to run this script, but continues to encounter this error. Could someone please help us understand what not do we have here?
The script must be run from the vMA, not a Windows system with vcli/viperltoolkit. Try to run it from the vMA.
http://communities.VMware.com/docs/doc-11901
Requirements
ESX(I) 4.x or vCenter 4.x
VMware 4.x VMA
-
Problem to run the script from cron
I have a script I want cron to run every day and it works fine if I connect at the VMAs and run it from the command line, but cron raise fair return "unavailable server version to... /usr/lib/perl5/5.10.0/VMware/VICommon.pm line 545. And the thing is, he has worked for cron too before update us the vMA to 5.0.0.1 build 643553.
Any ideas how to solve this problem?
Try adding
{PERL_LWP_SSL_VERIFY_HOSTNAME} $ENV = 0;
-
I need help pass my Photoshop 7 from my old laptop to my new laptop running Windows 7 Enterprise. I have in vain two routes. I have the installation CD, it does not autoplay. I run Autoplay.exe in the root directory, I'm greeted, I choose English, I accept the EULA, I get the choice window Install / explores, with the install button already selected, click the button in Photoshop, CD towers, and nothing happens. In the 2nd attempt I run Setup.exe in the directory of Photoshop and nothing happens at all the. I'm never even offered the opportunity to enter my product code. What should I do?
There is probably a problem of compatibility between the old software and the more recent operating system.
-
Best way to run a script from a script
Hello world
I'm looking for running a script from an After Effects script, so far, there is aftereffects.executeScript (scriptContent) who use eval to run the script. The problem is that it uses eval so it is not really sure and he is slower. So I would like to know what is actually used when we file-> Script-> Run script file.
As seen in the Javascript tool Guide CC page 168 in the section QAnywhere Corss-DOM.
aftereffects.executeScript(theScriptContent); // Doesn't work with a script which as comments AND the script has access to my scope
In addition, if there are comments like / * * / or / * / in the script I want to run, it no longer works.
So, what is the best way to run a script from a script?
If you want to evaluate a whole script file, you can use $.evalFile (file, timeout) - see description in ESTK object model viewer
To evaluate a bit of code, you can use eval, that's for sure.
Xavier
-
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
-
I need help to write a script that detects the first instance of a paragraph style and then change
I need help to write a script that detects the first instance of a paragraph style and then he goes to a different paragraph style. I don't necessarily need someone to write all this, by the biggest problem is to find how to find just the first instance of the paragraph style. Any help would be greatly appreciated, thank you!
Hello
then try this with your active doc:
....................
myDoc var = app.activeDocument;
mStyle var = myDoc.paragraphStyles.item ("PS_NameToFind"); change the name to paraStyle
var mStyle_1 = myDoc.paragraphStyles.item ("PS_NameToChange"); change the name to paraStyle
var mFrames = myDoc.pages.everyItem ().textFrames.everyItem () .getElements ();
app.findTextPreferences = null;
app.findTextPreferences.appliedParagraphStyle = mStyle;
for (var k = 0; k)< mframes.length;="">
{
currFound = mFrames [k] .findText ();
If (currFound.length > 0)
currFound [0] .paragraphs [0] .appliedParagraphStyle = mStyle_1;
}
app.findTextPreferences = null;
................
Rgds
-
I use Photshop CS2 on Win XP
I set up a keyboard shortcut (Ctrl + Alt + P) to execute a .jsx file in the folder... \Presets\Scripts\.
When I activate the script via the keyboard shortcut ExtendScript is called and interrupts execution on main() statement (see below).
When I activate the script via the menu file/Scripts that extendscript is not called and the script runs up to the end.
The .jsx file is a wrapper for a .vbs script that does the 'real' work
The .jsx is:-
main() function
{
var VBSscript = file ("C:/Program Files/Adobe/Adobe Photoshop CS2/Presets/Scripts/GGN_PS_Code_v1_2.vbs");
If (VBSscript.Exists) VBSscript.execute ();
}
main();Anyone have any ideas on how to disable the invocation of ExtendScript when I run the script from the skortcut?
One thing to check is that the .jsx extension is associated with Photoshop and not ExtendScript.
-
Need help on transfer of files from one server to another server.
Hi all
I need help on transfer of files from one server to another server (Unix box to another Unix machine) using jdeveloper and BPEL process.
I'm new to these technologies, can you please help me on this. If you encounter documents please share it with me.
We use BPEL and Jdeveloper 10.1.3.3.0 version
Thanks in advance!
Concerning
Vincent
Published by: user10263255 on 15 Sep, 2008 12:25Vincent,
One of the options I can think of is creating mount points on the boxes of unix and then using the File adapter.
-
Running a script from the command line
Hi all
First of all, I'd like to say I'm just starting ORACLE 11 g with no prior experience of the database. I currently lectures once a week. However, I am stuck with a problem. I am trying to access my database of the United of the House so I can do some work, apparently I can only access it via the command prompt (which is good for me) I began by downloading a shell www.putty.org secure and I managed to connect to my database of test of the University from my laptop at home. However, I have a createHR.sql of script file that is stored in my C:\ORACLE directory which I try to access in order to load my test tables and start practicing with them.
use command line
SQL > C:\ORACLE\createHr and I get SP2-0310: unable to connect to the file "C:\ORACLE\create HR.sql".
normally, this should load and run the script - as with the browser method guests will get the tables is created and the test data.
I am now officially frustrated that I can't get any done practice, offered any help will be welcome.
Concerning
Claude
Published by: 891128 October 12, 2011 09:33
Published by: 891128 October 12, 2011 09:41
Published by: 891128 October 12, 2011 09:44891128 wrote:
I started by downloading a shell www.putty.org secure and I managed to connect to my database of test of the University from my laptop at home.
However, I have a createHR.sql of script file that is stored in my phonebook C:\ORACLEThese two sentences above are essential. If I had to bet a directory C:\ORACLE assumption is located locally on your laptop. However, it seems you have done a SSH connection to your server and connected to the database using SQL * more customer on the server. The client on the server has no idea or access to files on your machine.
You must open the script on your laptop and copy / paste into your SQL SSH * more session or you will need to find a way to copy this script on the server, so you can run it.
I hope this helps!
-
Need help with understanding PowerCli scripting by LucD
Hello
I'll give you the standard statement that I am a noob powercli and don't really know what I'm doing here. Here's a script that works because it runs without error and gives a report but I need help to understand this under his weight.
Connect-VIServer '< our vcenter >' - user < user > admin-password < admin-user-pwd >
$allvms = @)
$vms = get - Vm | where {$_.} PowerState - eq "Receptor"}
$start = (get-Date). AddDays(-1)
$metrics = "mem.usage.average".
$stats = get-Stat-entity $vms - start $start - Stat $metrics
$stats | Group-object - property {$_.} Timestamp.Day}, {$_.} @entity.name} | %{
$vmstat = "" | Select the day, MemAlloc, MemMin, MemMax, MemAvg, VmName
$vmstat. VmName = $_. Values [1]
$vmstat. Day = $_. Group [0]. Timestamp.Date
$mem = $_. Group | where {$_.} MetricId - eq "mem.usage.average"} | Measure-object-property value - average - Maximum - Minimum
$vmstat. MemMax = [int] $mem. Maximum ##dfsdf
$vmstat. MemAvg = [int] $mem. Average
$vmstat. MemMin = [int] $mem. Minimum
$vmstat. MemAlloc = $_. Group [0]. Entity.MemoryMB
$allvms += $vmstat
}
$allvms |
Export-Csv "c:\ < folder > \ <>.csv file Destination"-noTypeInformation
It connects to our server vcenter server and offers two days of data. Today and yesterday, all with a timestamp of 0:00. See below for an example of a virtual machine.
VmName Day MemAlloc MemMax MemAvg MemMin < name VM1 > 07/05/2016 0:00 4096 18 18 18 < name VM1 > 06/05/2016 0:00 4096 36 12 8
The MemMax, the MemAvg and the MemMin are for this day? Just the max of this period of sampling time 0:00?
What I'm looking for, it is to find that the use of the maximum memory of virtual machines are for the whole day. So I hope that I can remove memory of VMs that do not use it. I was listed on the change $start = (Get-Date). The value of AddDays(-1) to $start = (Get-Date). AddDays(-30) and see what things alike. I want to be sure however that the value for MemMax is the highest value for a period of 24 hours. That is to say for the 07/05/2016 the given virtual machine never used a maximum of 18% of his memory attributed the 06/05/2016 the maximum amount of memory used was 36%, and so on that I extend on the date range.
Kind regards
Michael
It then becomes a rather simple Get-Stat script.
$vms = get - Vm | where {$_.} PowerState - eq "Receptor"}
$start = (get-Date). AddDays(-1)
$metrics = "mem.usage.average".
Get-Stat - entity $vms - start $start - Stat $metrics |
Select Timestamp,@{N='VM'; E={$_. @entity.name}}, Value |
Tri-objet-VM property |
Export-Csv "c:\
------ .csv '-noTypeInformation -
No model output module custom when you run the script from another process
Hello
I have a following problem:
Try to automate the video rendering. When I run extend script of the program that is launched at windows startup, there is no custom output module template. If the script is started manually, it works perfectly.
Trying to applyTemplate output module in the results of item renderer error queue.
I use AE 2014 (13.1.1.3) and windows server 2012 standard r2.
Thanks for help.
Sounds like a permissions problem, you will need to set your user contexts and escalate privileges before running the script.
Mylenium
-
Need help to write a script that opens files, removes layers and sous-calques
Hey all,.
I'm a noob to the community of script, and what I try to do is file edit commands that share the same names of layers and sublayers. I have a few questions that would be incredibly useful if I could have answered.
I'm not sure how to define a script too call out of the layers that have been created without script. I need to create a variable for the existing layers and leave the script to know what their names are in the files?
For example, I have three files which have each layer named 'cutlayer', 'trimlayer', 'fold' and 'work '. I need to write a script that opens three files, deletes the layer 'fold' of each file, and then move the layer "trimlayer" in his own sublayer in 'work' (the base layer can be on the top so reorganization sublayers is not necessary to worry about something). I do not understand how to write the script because I couldn't find examples in the documentation for the script provided on the adobe website which has worked with existing files.
It's my shot at what I'm trying to do, with English fill in the blanks of what I do not know how to script. If anyone can help me understand this point, I would really appreciate it!
app.documents.openDlg (prompt, filter, MultiSelect); the user opens the associated files
If (documents.length > 0) //run the script through each document individually
{
sourceDoc = activeDocument;
delete the "fold" sourceDoc layer
move the "trimlayer" in the layer "work."
remove the underlayment 'path' of layer "work."
Run the script through each document
Save the new file name folder in the new parallel to the current folder on the hard disk
Go out and spend in each document until there is no more
}
create new document
Place documents published in different layers in the new document, with a distance between them, optimize the space on a 51 "x 51" work plan, using as little of the artboard as possible. "
All comments are things basically, I do not know how and am trying to figure out how to do, so if anyone has a second to explain some of these things, I would really appreciate it!
Thanks again!
I know it of very frustrating when his apprenticeship and things don't go as planned, but understand that it is quite confusing as it is and do not add more confusion to the mix by using other tools than those provided. I mean JSLint, it might be useful with GENERAL javascript syntax, but Adobe's Javascript implementation is another animal, or another language, always JavaScript, but intended to be run by its own engine. JSLint has no idea what "layers", or "pathItems" are, it will trigger errors when he sees the objects, it does not recognize.
.. .in learning... not to take baby, write a single line of code and run... If it works, write another line of code
Try this version (always in the ESTK),'re missing you a few "++", and you do not change "documents" with "docs" in a certain place
var docs = File.openDialog("Select Files to Open", "*.ai", true); var idx = 0; for (idx = 0; idx < docs.length; ++idx) { var doc = app.open(docs[idx]); var myCounter = 0; for (myCounter = 0; myCounter < doc.layers.length; myCounter++) { doc.layers[myCounter].locked = false; } doc.layers.getByName('Crease').remove(); doc.layers.getByName('Regmark').remove(); doc.layers.getByName('Artwork').pathItems[0].remove(); doc.layers.getByName('Through Cut').hasSelectedArtwork = true; doc.layers.getByName('Through Cut').pathItems[0].strokeColor = doc.swatches.getByName("Black").color; doc.layers.getByName('Through Cut').move(doc.layers.getByName('Artwork'), ElementPlacement.INSIDE); }
-
Hello
I forgot that my administration windows log password after the holidays. I have loaded down a free program called Ophcrack and had set my laptop to boot from cd 1 but I just cannot get the laptop to boot from a cd. He just continued boot from the internal hard disk.
The cd is an image and it is bootable on my desk.
The model of laptop: laptop HP ENVY m6
Product number: C2N77UA #ABL
BIOS version: F.25
Processor type: Intel Core i7-3632QM CPU @ 2.20 GHz
OS: Windows 8.1
I only did a password reset disk (I'm learning the hard way now!).
I don't want to do a "System Recovery" because I have some data on it.
I realize there are paid there password recovery tools windows, but I would like to use this 'free' program to try to break 1.
I just need help / instructions to set the bios for laptop can be started from a cd. I also tried to boot from a key USB but the laptop kept begin its internal drive.
Help, please. Thanks a ton!
Ted
Hi Ted,
You are welcome
Boot into the bios menu and go to the very section where you have disabled the Secure Boot.
Find an entry called materials and this value to Activate.
Save the changes and exit the bios.
Follow the previous procedure below:
Insert the bootable disc of Ophcrack and laptop stop.
Tap away at the esc you key start Notepad to open the Start Menu. Select boot options ( f9 ), use the arrow keys to select the CD/DVD drive and press ENTER. You can also get a prompt to "Press any key to" continuous - it if requested.
Kind regards
DP - K
-
How to run a script from a "Button 1" button?
Hi all, I had this problem to have a window with several buttons named "Button 1" "button 2"... and run the script 'Script A' If you click on button 1, the script 'Script B' If you click on the button 2, etc... ".
Here is my small script:
indesign #target
create a table of contents that send directly to the good script
var l = new Window ("dialog");
var buttongroup = w.add ("group");
var panel = buttongroup.add ("panel");
var button1 is panel.add ("button", undefined,"Script");.
var button2 is panel.add ("button", undefined, "Script B");.
var button3 is panel.add ("button", undefined, "Script C");.
var cancel = buttongroup.add ("button", undefined, "Cancel", {name:'cancel'});})
buttongroup.addEventListener ('click', press)
w.Show ();
function press (e) {}
{if(e.Target.type=="Button")}
If {(A e.target.text is "Script. »)
w.Close ();
app.doScript (new File("c/scriptA.jsx"),ScriptLanguage.javascript);
}
Else if (e.target.text == "Script B") {}
app.doScript (new File("c/scriptB.jsx"),ScriptLanguage.javascript);
}
Else if (e.target.text == "Script C") {}
app.doScript (new File("c/scriptC.jsx"),ScriptLanguage.javascript);
}
}
}
Each manuscript A, B and C starts with an app.dialogs.add)
And that is the problem, he said that an alert or a modal dialog box is already active
I tried the w.close (), but it does not work...
I don't think that addEventListener is what I need, maybe I'm wrong for a window, but it is the only way to give names to the buttons, is it not?
Instead of var this:
w = new Window ("dialog");
Use this:
var l = new Window ("range");
Peter
Maybe you are looking for
-
the tab bar disappears unless the cursor is on it, and there is no button "firefox".I rebooted, undervalued and redownloaded firefox - all to nothing will do.Is it possible to get it working properly again?
-
I want to delete search suggestions in the drop down menu in the address bar.
I've just updated Firefox to 22.0 and now when I type something in the address bar, the menu drop-down displays search suggestions. I used to be able to type a letter or two from the site that I wanted to go to and just press enter and Firefox automa
-
Satellite L635-113: BT Nokia N70 - service detection failed
Model: Toshiba Satellite L635-113. I use internet to Bangladesh with her since the first day. And I use internet through Bluetooth to the laptop with my Nokia N70. Suddenly 2 days when I went to connect it shows me an error message which is "Detectio
-
M35-S456 file Ghost in my dict of recovery, but it requires the password
I have the ghost file in my recevery dict but it requires the password, someone help me pleaseM35-S456
-
Product name: HP ENVY 15 x 360: Mute LED does not work
My mute led (F6) no longer works. The mute real works but not the LED is orange. I have read other forums about this, but they were out of date and do not fix my problem. Help, please.