Jmeter with csv file in Linux for Login - linux

Iam new to linux , i know how to run jmx files with CSV in Windows. Can any please guide how to run the jmx script with CSV for concurrant logins ??

Absolutely the same way:
Use relative path to the CSV file, not the absolute path because Linux file system is different, it doesn't have drive letters
Copy the CSV file along with the .jmx file to the same folder at the Linux machine, this way you will be able to use just filename in the CSV Data Set Config
If you need the guidance on installation of JMeter on Linux:
you will need Java Runtime Environment, check you Linux distribution documentation for Java installation details
download JMeter using your browser (or command-line tools like wget or curl)
copy the .jmx and the .csv files to the machine
run your test in command-line non-GUI mode

Related

How to install Nodejs on CentOS 7 without Internet connection with root permission?

I've recently migrated to Linux CentOS7 from windows and I need to install Nodejs to my target, but in target system there is no Internet connection. How can I install Nodejs with all dependencies in offline mode? Thanks in advance for your answers.
you can download node.js binary from its website and you can copy that file using ssh to your target machine.
extract it and add its path to your environment variables.
for more details you can visit here
here is my procedure
To install NodeJS we need an online server to download requirements.
You can download it from Node’s official website. Make sure you download Linux binary version of it.
Or you can use this link:
https://nodejs.org/dist/v16.14.0/node-v16.14.0-linux-x64.tar.xz
After downloading Linux Binary, copy it to your offline machine.
Then go to the directory you copied and unzip your downloaded file by using tar command.
Next step we are going to define the unzipped directory to our environment variables.to do this first go to /etc/profile.d and create a file. its name should be nodejs.sh
Copy commands below to nodejs.sh file and save it.
#!/bin/sh
EXPORT PATH=/home/node-v16.14.0-linux-x64/bin:$PATH
Note : /home/node-v16.14.0-linux-x64/bin (file address) may differ from yours
Restart your session and then enjoy NodeJS on your offline Linux machine.

CRLF tags attached upon FTP upload from a windows to Linux Server

I am uploading the files in a FTP folder from Windows server to a Linux server. Files come in different extensions but can be opened using notepad or notpad++.
I am getting issues that CR & CRLF are getting attached after FTP upload to Linux from Windows.
I am uploading a file from windows in the below format
This is the file after FTP Upload to Linux server. We can see many CR and CRLF tags getting attached, which shouldn't be the case.
I need the files in the below format in Linux (With only LF tags attached)
For FTP from windows to Linux, I am using the Batch Script as below..
open XXXXXXXXXX.net
UID
PASSWORD
cd METS
cd MARVELRAIL
binary
mput E:\METS+_BULK_UPLOAD\BULK_FOLDERS\OUT\DISCH\*.*
quit
Can you help me where I am going wrong and how to beat this issue...
Thank in advance.
If you want the files to be converted to *nix line endings, do not use a binary mode, use an ascii mode.
The ascii mode is the default one, so removing binary command should be enough.
Or you can explicitly use ascii command.

Windows Linux Subsystem - File permissions when edited outside bash [duplicate]

As the title suggests, if I paste a c file written somewhere else into the root directory of the Linux Subsystem, I can't compile it.
I did a test where I made two differently titled hello world programs: one in vi that I can get into from the bash interface, and one elsewhere. When I compiled the one made in vi, it worked fine. Trying to do so for the one made elsewhere (after pasting it into the root directory), however, resulted in this:
gcc: error: helloWorld2.c: Input/output error
gcc: fatal error: no input files
compilation terminated
Any help with this would be much appreciated.
Do not change Linux files using Windows apps and tools!
Assuming what you meant by "paste a C file written somewhere else into the root directory of the Linux subsystem" is that you pasted your file into %localappdata%\lxss, this is explicitly unsupported. Files natively created via Linux syscalls in this area have UNIX metadata, which files natively created with Windows tools don't have.
Use /mnt/c (and the like) to access your Windows files from Linux; don't try to modify Linux files from Windows.
Quoting from the Microsoft blog linked at the top of this answer (emphasis from the original):
Therefore, be sure to follow these two rules in order to avoid losing files, and/or corrupting your data:
DO store files in your Windows filesystem that you want to create/modify using Windows tools AND Linux tools
DO NOT create / modify Linux files from Windows apps, tools, scripts or consoles
You cannot copy (by default, who knows how Windows bash is set up!) files into the root directory! Your gcc error is say "no input files", so the copy has most likely failed. Copy the files to your home directory instead, for instance:
cp helloWorld2.c ~/
instead of:
cp helloWorld2.c /

Compare time-stamp of a remote file with a local file using Ant

I have an installer file on my remote machine with Installer-000.zip name and i want to copy that file into my local machine(linux-CentOS) under /media/Data/Installer/ directory using ant ftp task.
I am able to copy the installer from remote server to my machine if the installer is not already present in my machine but when i again run the build.xml it downloads the heavy installer file again on my local machine which makes the whole building time much longer.
so esentially i want to comapre the time-stamp of my installer(remote) with one on my local machine and copy from remote to local if the installer file present on remote machine has a newer time-stamp.
(Obviously I want an ant task to do this. I am using ant-version 1.9.6 )
any suggestion or comments would be appreciated !
Thanks in advance !
I don't think there is an ANT task that will calculate the checksum of a remote file. I suggest a different approach of using rsync over ssh.
Ant, download fileset from remote machine

Running .jar File on Linux

I have a .jar file that reads two files from within its current folder and produces as output a .txt file and a separate folder with multiple other .txt files. This works perfectly in Windows using this code to create the directory:
static String dir = System.getProperty("user.dir");
I used the instructions here: https://askubuntu.com/questions/192914/how-run-a-jar-file-with-a-double-click to set up my .jar file to run on a simple double-click, but as of right now, it does nothing when double-clicked. My guess is that the above line of code does not translate well to Linux. Anybody know how to resolve this?
First, try running it on the command-line, with
java -jar <file.jar>
The user.dir property is cross-platform (see here) so it should not be the problem. However, are you using correct file separators? Remember it's '/' on UNIX and '\' on Windows.
Try java -jar Jarname.jar and pass other files as arguments after this command
The code line you gave works fine on linux.
My best guess is that you're then trying to use this directory path by adding a windows-specific path separator (like path + "\subdir") which isn't appropriate for linux (you should build a new File object instead).
Either that, or your jar file isn't being executed at all. Have you tried doing something very simple in your jar file to see if anything is being run? Have you tried running your jar with java -jar myapp.jar to see if any exceptions are thrown or error messages displayed?
You will need to manually tweak your build process to get the jar file marked as executable. In your build xml file, there is a target, "-post-jar", that is called after the jar is built. You'll need to make that target and use Ant's chmod task to modify your jar. Once you do that it will occur every time you make a jar file in that project.
It will run fine as long as you have a JRE installed.
Read this article to know more.

Resources