jmeter 3.0 -e -o Command-Line Issues "folder not empty" - jmeter

Reference http://jmeter.apache.org/usermanual/generating-dashboard.html, but always being given to the last command line when running -e -o "folder not empty" do not know how to solve?(jmeter3.0)

Like you can see in the Jmeter documentation :
-o
output folder where to generate the report dashboard after load test. Folder must not exist or be empty
I think it is so amazing from Jmeter !!!
Best Regards
Ludo

Use -f flag in your command.
-f will force delete existing results files before start the test

I have tested yesterday . by placing just "tmp" after -o . it created a folder called tmp in bin directory of jmeter .
Note .. when new reports are generating JMETER uses "temp" as a temporary folder and then it transfers to userfolder in my case it was tmp . I tried you way . I dont have any folder named "tmp" in C drive then i got the below message.
C:\JMETER\apache-jmeter-3.0\bin>jmeter.bat -g mylog.jtl -o C:\tmp\suman
Writing log file to: C:\JMETER\apache-jmeter-3.0\bin\jmeter.log
An error occurred: Cannot write to 'C:\tmp\suman' as folder does not exist and parent folder is not writable
errorlevel=1
Press any key to continue . . .
and then I created a parent folder "tmp" in c drive and excuted the same command again this time i am through it
C:\JMETER\apache-jmeter-3.0\bin>jmeter.bat -g mylog.jtl -o C:\tmp\suman
Writing log file to: C:\JMETER\apache-jmeter-3.0\bin\jmeter.log
C:\JMETER\apache-jmeter-3.0\bin>
Next I tried your way i created a folder "madan" and i kept some files in it and then I tried pointing to that directory, I have got same message what are you seeing .
C:\JMETER\apache-jmeter-3.0\bin>jmeter.bat -g mylog.jtl -o C:\tmp\madan
Writing log file to: C:\JMETER\apache-jmeter-3.0\bin\jmeter.log
An error occurred: Cannot write to 'C:\tmp\madan' as folder is not empty
errorlevel=1
Press any key to continue . . .

Related

Getting permission denied while creating a directory and how to add suffix to .exe to each files in a directory

I want to create a directory say source_dir and add few dummy files without content into this directory like file1.txt, file2.sh, etc
Now I want to create another directory say destination_dir and move all the files from source_dir to destination_dir but all the files that got moved from source_dir should be suffixed by .exe
Example:
source_dir
file1.txt file2.sh
destination_dir should have output as
file1.txt.exe file2.sh.exe
What I have tried :
I used mkdir source_dir -> But getting error cannot create directory. Permission denied.
touch file1.txt file2.sh -> I thought to use this command to create the files without content but not able to create a directory itself.
Once error is resolved and files are created in source_dir then I will use
mv .* source_dir destination_dir -> To move all the files at once but for this command I am not sure whether this will work or not
Then how to suffix all the files with .exe is also challenging to me and got stuck.
Can someone help me resolving the error of create directory and how to add suffix to each files?
I used mkdir source_dir -> But getting error cannot create directory. Permission denied.
It seems you do not have permission to create a fodler here. You might use sudo mkdir source_dir, but is likely a better idea to make the folder in a directory where you have write access EG. $HOME.
Once error is resolved and files are created in source_dir then I will use mv .* source_dir destination_dir -> To move all the files at once but for this command I am not sure whether this will work or not
For moving use mv .* destination_dir from withing the source_dir. (IE, first cd source_dir then run the move command from above)
Then how to suffix all the files with .exe is also challenging to me and got stuck.
You will have to loop over the files and move them one by one.
for i in * ; do mv "$i" "${i}.exe" ; done

difference in how mv command acts in dockerfile and on my local linux

I am looking at the following jboss/wildfly docker file which has the following command:
mv $HOME/wildfly-$WILDFLY_VERSION $JBOSS_HOME
where $WILDFLY_VERSION=17.0.1.Final and $JBOSS_HOME=/opt/jboss/wildfly.Thus the resulting command translates to:
mv $HOME/wildfly-17.0.1.Final /opt/jboss/wildfly
Later in the file we start the wildfly like this:
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0"]
So I assume that the mv command from the above took the content of $HOME/wildfly-17.0.1.Final directory and put it inside the /opt/jboss/wildfly directory.
However, if I try to recreate the steps from the dockerfile on my local machine (ubuntu 18.04) when I do mv $HOME/wildfly-17.0.1.Final /opt/jboss/wildfly, I end up with the following directory structure /opt/jboss/wildfly/wildfly-17.0.1.Final. That is, the wildfly-17.0.1.Final directory itself is copied into /opt/jboss/wildfly, rather than its content.
Can somebody please explain why I get this result locally?
$JBOSS_HOME path doesn't exist.
What the mv command does is actually replace the non-existent directory with the $HOME/wildfly-17.0.1.Final folder. That been said, the content of $HOME/wildfly-17.0.1.Final/ will be moved into $JBOSS_HOME replacing the name of the folder from "wildfly-17.0.1.Final" into "wildfly".
Simple Example would be as follow:
Create an empty dir and touch a file inside it, then try to do:
mv dir /var/lib/non_existing_folder
dir will be moved as is and replace "non_existing_folder".

cp and rsync cannot find system directory

I am working on a script to copy a custom user profile over to the default. Part of the script uses rsync to copy the contents of the customized profile, named "profile" to the default profile located in: /System/Library/User Template/English.lproj. Each time I run the command interactively, it fails indicating "No such file or directory." I can browse to the directory in the Finder. I can navigate to the directory via the terminal. Why can't rsync find it? Here is the command:
rsync -av /Users/profile/* /System/Library/User\ Template/English.lproj
I tried a similar approach using cp -R instead of rsync and got a whole bunch of file not found error messages. Using the cd command to that same path also fails. I can step through each individual directory and arrive at English.lproj but I can't do it in one command. Any ideas where I am going wrong with my command?
Thanks
Jason

unknown error in shell script

I have cobbled together a shell script to submit multiple jobs on a cluster, which it appears to without giving me an error message, but the output files are missing and the error log files are also empty. What the script supposed to do is 1.) make a bunch of new directories, 2.) copy four files to each (mainparams, extraparams, infile, and structurejobsubmissionfile) 3.) then submit each one to the cluster for it to run structure while changing one parameter in the mainparams file every tenth directory (that's the 's/changethis/'$k'/g' line).
Test running it on the front end gives no errors, the structure program is up to date on the cluster, and the cluster administrators don't see anything wrong. Thanks!
#!/bin/bash
reps=10
numK=10
for k in $(seq $numK);
do
for i in $(seq $reps);
do
#make folder name (ex. k4rep7)
tmpstr="k${k}rep${i}"
#echo "Making folder and filename $tmpstr"
#make the new folder
mkdir $tmpstr
#go to that folder
cd ./$tmpstr
#copy in the input files
cp ../str_in/* ./
#modify the recently copied input file here so source file remains the same
cp ./mainparams ./temp.txt
#change maxpops to current value of k and the directory for the files to the current directory
sed -e 's/changethis/'$k'/g' -e "s:pathforrunningstructurehere:$PWD:g" ./temp.txt > ./mainparams
#get rid of temporary file
rm ./temp.txt
#inside $i so run STRUCTURE here
qsub -q fnrgenetics -l nodes=1:ppn=1,walltime=20:00:00 structurejobsubmissionfile
#go back to parent directory
cd ../
done
done
I can't see anything obviously wrong, but I think the place that you'll find the answer lies in better logging and better error checking. Some of the things that you're not checking that you should:
Is $tmpstr created correctly? (will fail on disk full or if permissions are not set correctly)
does str_in/ exist, and is it a directory?
does it contain files?
does it contain mainparams?
is qsub in $PATH?
does the call to qsub return an error?
You can roll an error logging function of your own, or use a package like log4bash

gvim on windows: file pointed to by tempname() does not exist

I'm trying to use a vim script that issues commands to sas,
When i try to run the script i receive an error
"Can't open file ..path.. /AppData/Local/Temp/ .. temp file .. "
this is the path and file name returned by :tempname()
After navigating to the appdata temp files directory, the temp file does not exist.
I've tried manually changing the backup directory with set backupdir=~\tmp
(a directory I created)
but that doesn't change the return value of :tempname() nor does the tempfile actually exist.
Two questions,
1. Is there a way to ensure vim is writing the file the script seems to need
2. can i rewrite the script to avoid needing a temp file? (just pass the path to the actual file to sas?)
the relevant part of the script is
let returntxt = system("\"" .
\ shellescape("C:\\Program\ Files\\SAS\\SASFoundation\\9.2\\sas.exe") .
\ "\ -nosplash" . "\ -sysin" . "\ " .
\ shellescape(expand("%:p")) . "\"")
" Shows the return messages from the SAS commandline (may be useful
" if no log produced)
:echo "*** SAS commandline: " . returntxt
Option 'backupdir' contains a list of directories where backup files are generated, it has nothing to do with temporary directory (except that it depends on where it is located, opposite is not true). You should try using %TMP% or %TEMP% environment variable, either from vim using
let $TMP=expand('~/tmp')
or before vim is launched (don’t know how to do this on windows). Using let $TMP does work for me under wine, but only for existing temporary directories.
Note that your system() call is rather strange: shellescape() should already add all needed quotes so that surrounding "\"" are not required (if it does not you should properly configure 'shell*' options). You also don’t need to escape spaces: "\ " and " " are exactly the same strings.
About second question: you can try passing file contents as a second argument to system(), but if file may contain NULLs it is not going to work.

Resources