Not able to run fio bechmark as a root

0

1

I'm not able to run fio benchmark as a root user.

Normal mode:

Command 1:

which fio

Output 1:

/usr/local/bin/fio

Command 2:

fio

Output 2:

No jobs(s) defined

fio-2.12
fio [options] [job options] <job file(s)>
  --debug=options   Enable debug logging. May be one/more of:
            process,file,io,mem,blktrace,verify,random,parse,
            diskutil,job,mutex,profile,time,net,rate,compress
  --parse-only      Parse options only, don't start any IO
  --output      Write output to file
  --runtime     Runtime in seconds
  --bandwidth-log   Generate per-job bandwidth logs
  --minimal     Minimal (terse) output
  --output-format=x Output format (terse,json,json+,normal)
  --terse-version=x Set terse version output format to 'x'
  --version     Print version info and exit
  --help        Print this page
  --cpuclock-test   Perform test/validation of CPU clock
  --crctest     Test speed of checksum functions
  --cmdhelp=cmd     Print command help, "all" for all of them
  --enghelp=engine  Print ioengine help, or list available ioengines
  --enghelp=engine,cmd  Print help for an ioengine cmd
  --showcmd     Turn a job file into command line options
  --eta=when        When ETA estimate should be printed
                    May be "always", "never" or "auto"
  --eta-newline=time    Force a new line for every 'time' period passed
  --status-interval=t   Force full status dump every 't' period passed
  --readonly        Turn on safety read-only checks, preventing writes
  --section=name    Only run specified section in job file
  --alloc-size=kb   Set smalloc pool to this size in kb (def 1024)
  --warnings-fatal  Fio parser warnings are fatal
  --max-jobs=nr     Maximum number of threads/processes to support
  --server=args     Start a backend fio server
  --daemonize=pidfile   Background fio server, write pid to file
  --client=hostname Talk to remote backend fio server at hostname
  --remote-config=file  Tell fio server to load this local job file
  --idle-prof=option    Report cpu idleness on a system or percpu basis
            (option=system,percpu) or run unit work
            calibration only (option=calibrate)
  --inflate-log=log Inflate and output compressed log
  --trigger-file=file   Execute trigger cmd when file exists
  --trigger-timeout=t   Execute trigger af this time
  --trigger=cmd     Set this command as local trigger
  --trigger-remote=cmd  Set this command as remote trigger
  --aux-path=path   Use this path for fio state generated files

Fio was written by Jens Axboe <jens.axboe@oracle.com>
                   Jens Axboe <jaxboe@fusionio.com>
                   Jens Axboe <axboe@fb.com>

As a root user:

Command 1:

which fio

Output 1:

no fio in ($path)

Command 2:

fio

output 2:

bash: fio: command not found

I have found a few posts relating to this. I have also tried to add the path of fio (path given by which fio as non-root user) to ~/.bashrc and tried to source the file but it did not work. What else changes should I make in order to make it work. Someone please help me. Thanks in advance.

Bhaskar Jupudi

Posted 2016-06-30T23:06:45.640

Reputation: 1

Answers

0

What is the content of your PATH variable? (see the output of export | grep PATH. My guess is that /usr/local/bin/ is not in the PATH for root. You can either add it to root's path. Create a symlink from one of the system folders, or simply run the command with the fully qualified path.

Zoredache

Posted 2016-06-30T23:06:45.640

Reputation: 18 453

Thank you so much for your reply. I added /usr/local/bin/fio to the path not /usr/local/bin . This solved my problem. – Bhaskar Jupudi – 2016-06-30T23:42:20.920