ONTAP Discussions
ONTAP Discussions
Hi,
I get the following error message when i try to run perfstats on a unix system:
~/Downloads$ ./perfstat.sh perfstat -S orion -t 2 -i 2 -I > perfstat.out
Perfstat: Perfstat v7.36 (4-2011)
Perfstat: Invalid perfstat invocation: './perfstat.sh perfstat -S orion -t 2 -i 2 -I' Please consult ./perfstat.sh -help.
Perfstat: Verify host rsh access
./perfstat.sh: 10039: rpm: not found
Perfstat: Allowing perfstat to run for a max 300 seconds
Perfstat: Collect Prestats
Perfstat: Prestats on ubuntu; OS: Linux
Perfstat: Sleep 120
Perfstat: Collect Poststats
Perfstat: Killing background processes...
Perfstat: Poststats on ubuntu; OS: Linux
I tried using "-f orion " and "perfstat -l root : pwd orion -t 2 -i 2 -I > perfstat.out",but the i get the same result.But when i try to get the perfstat of the same filer through windows system then it works fine.I used "perfstat -l root : pwd orion -t 2 -i 2 -I > perfstat.out " on windows system.
Can any one tell me the correct invocation for unix system.
Thank you,
Rahul
The correct invocation can be found, with examples, on the page preceding the download page for perfstat. I would suggest you try reading it again. Try using a switch that avoids collecting local stats from your ubuntu server if you don't need them.
Hi Shaunjurr,
I thank you for your post.I tried all possible invocations from the perfstats download page and i think it is an issue with the authentication.We need to have SSH key authentication associated with individual user accounts from the back up server to the filer.
Hi,
Key authentication works just fine. You need to actually read what the script is telling you in your example "Perfstat: Invalid perfstat invocation: './perfstat.sh perfstat -S orion -t 2 -i 2 -I' Please consult ./perfstat.sh -help."
You just haven't read carefully. Why are you writing ':/perfstat.sh perfstat...' ? That makes no sense and it is no wonder that the script is telling you that you are doing something wrong... because you are.
I can't tell if the last switch/option is -(capital i, or small L).
This should work (if the user that you are using to invoke it has its public key on the filer): "perfstat.output" will contain all of the output besides what goes to STDERR (standard error)
./perfstat.sh -f filer_name -t 2 -i 2 -S -I > perfstat.output (the last option is capital "i")
You might want to add the -F option to avoid collecting everything about the linux/unix host, perhaps also -p to just capture performance info instead of also getting a full configuration dump of the filer, if it's not necessary.
-t should probably be a lot longer and you can adjust the sampling lengths within "-t" by using the "-i" option with multiple values... like "-i 10,10" or something. Again, ./perstat.sh --help will tell you all of this should you actually want to take the time to read it carefully.
The script works fine with public keys. As far as I can see from your examples, you are just using it wrong.
May be you haven't clearly seen what i have posted in the discussion.First take a good look at what i have posted in the discussion and give your reply politely.I have tried every single invocation,but could not get it right.I was right with my assumption because i have made it clear with one of the Technical Global Advisor for netapp.There will be a ssh authentication for individual user account from a unix server connecting to the filer and that has caused me of the above error.And for your reference i am posting the command invocation that you have posted:
ubuntu:~$ ./perfstat.sh -f orion -t 2 -i 2 -S -I > perfstat.output
Perfstat: Perfstat v7.36 (4-2011)
Perfstat: Verify host ssh access
./perfstat.sh: 10039: rpm: not found
Perfstat: Verify filer ssh access
Perfstat: Filer orion fails ssh test
Perfstat: Verify connectivity using: ' ssh -o BatchMode=yes -2 -ax orion -n -l root "version"' from ubuntu
Thank you for your post.
Hi,
So what did 'ssh -o BatchMode=yes -2 -ax orion -n -l root "version' give you for output?
What user are you supposed to be using on the filer if not root?
Hi,
i have the same problem with running perstat.sh in a script.
ssh -o BatchMode=yes -2 -ax orion -n -l root "version' --> i get a Permission denied error (publickey,password)
How can i import a public key to run a perfstat script in a linux(debian) environment?
These hint is not working for me:
Note: ssh and rsh is working, but only with enter passwordphrase
thx and br
Frank
What exactly is not working?
I have over 50 filers (and probably 30+ vfilers) that I can use ssh keys with openssh. The public key from whoever is going to login as root has to be in <root volume>/etc/sshd/root/.ssh/authorized_keys2 . This key has to be created without a password/passphrase or you have to use ssh-agent on your host to deal with passwords/passphrase.
Try to login via ssh first... perhaps with 'ssh -vvv' to see what is going on. You might want to make sure that you have no strange default local configuration that is breaking things for you.
My folder look like this:
/vol/vol0/etc/sshd/.ssh -> it contains id_dsa ; id_dsa.pub ; known_hosts
Linux Debian Host
Create pair ssh keys, private & public by ssh-keygen from SSH pkg like
ssh-keygen -t dsa -b 1024 [without paraphrase] -> copied to /vol/vol0/etc/sshd/.ssh -> .ssh doesnt exist -> created with 0600 rights
On the Netapp Storage System console
o Run the Secure Admin Setup using the command secureadmin setup ssh Setup will now generate the host keys. It will take a minute. After Setup is finished the SSH server will start automatically.
o make sure that ssh option on Netapp "ssh.pubkey_auth.enable" is on
4. Test the Connection from host
o You can now run ssh remotely from your host to NetApp to get info like:
[21:46][danielpr@siml9 ~] >ssh 192.168.1.2 -l root 'vol status -f'
Broken disks (empty)
[21:46][danielpr@siml9 ~] >
Something is wrong ... i see your folders are different.
Which folders and which file will be copied to which directory?
/etc/sshd/root/.ssh is not file - it is directory, just like on any Unix system. You put authorized keys into /etc/sshd/root/.ssh/authorized_keys (or may be authorized_keys2 for SSH-2 as pointed above, do not remember right now).
Read OpenSSH manual how authorized_keys is used.
Okay, i´ve createt /etc/sshd/root/.ssh/authorized_keys and /etc/sshd/root/.ssh/authorized_keys2 directory
ssh-keygen -t dsa -b 1024 and ssh-keygen -t rsa -b 1024 > id_dsa ; id_dsa.pub ; id_rsa ; id_rsa.pub copied into ...keys and keys2 directory. (note flags can set only to 755)
After that i do that:
secureadmin setup -f ssh
SSH Setup
---------
Determining if SSH Setup has already been done before...yes
You have chosen to re-run SSH Setup. The old host keys will be
backed up to the following files:
/etc/sshd/ssh_host_key.201109131705
/etc/sshd/ssh_host_rsa_key.201109131705
/etc/sshd/ssh_host_dsa_key.201109131705
Do you want to proceed? [no] yes
SSH server supports both ssh1.x and ssh2.0 protocols.
SSH server needs two RSA keys to support ssh1.x protocol. The host key is
generated and saved to file /etc/sshd/ssh_host_key during setup. The server
key is re-generated every hour when SSH server is running.
SSH server needs a RSA host key and a DSA host key to support ssh2.0 protocol.
The host keys are generated and saved to /etc/sshd/ssh_host_rsa_key and
/etc/sshd/ssh_host_dsa_key files respectively during setup.
SSH Setup will now ask you for the sizes of the host and server keys.
For ssh1.0 protocol, key sizes must be between 384 and 2048 bits.
For ssh2.0 protocol, key sizes must be between 768 and 2048 bits.
The size of the host and server keys must differ by at least 128 bits.
Please enter the size of host key for ssh1.x protocol [768] :
Please enter the size of server key for ssh1.x protocol [512] :
Please enter the size of host keys for ssh2.0 protocol [768] :
You have specified these parameters:
host key size = 768 bits
server key size = 512 bits
host key size for ssh2.0 protocol = 768 bits
Is this correct? [yes]
Setup will now generate the host keys. It will take a minute.
After Setup is finished the SSH server will start automatically.
270-sp*> Tue Sep 13 17:05:12 CEST [secureadmin.ssh.setup.success:info]: SSH setup is done and ssh2 should be enabled. Host keys are stored in /etc/sshd/ssh_host_key, /etc/sshd/ssh_host_rsa_key, and /etc/sshd/ssh_host_dsa_key.
When i login the keys where requested from /etc/shhd/root/.ssh ?
That´s my log from the Filer:
Tue Sep 13 16:40:38 CEST [sshd_1:info]: Failed password for 8ung from 10.68.24.192 port 4287ssh2
Tue Sep 13 16:44:25 CEST [sshd_1:info]: Failed publickey for root from 10.68.24.192 port 4315ssh2
Tue Sep 13 16:44:30 CEST [sshd_1:info]: Failed publickey for root from 10.68.24.192 port 4318ssh2
Tue Sep 13 16:44:45 CEST [sshd_1:info]: Failed publickey for root from 10.68.24.192 port 4319ssh2
Tue Sep 13 16:45:06 CEST [sshd_1:info]: Failed publickey for root from 10.68.24.192 port 4325ssh2
Tue Sep 13 16:47:27 CEST [sshd_1:info]: Failed publickey for root from 10.68.24.192 port 4336ssh2
Tue Sep 13 16:47:30 CEST [ems.engine.inputSuppress:warning]: Event 'openssh.invalid.channel.req' suppressed 7 times since Tue Sep 13 16:40:52 CEST 2011.
Tue Sep 13 16:47:30 CEST [openssh.invalid.channel.req:warning]: SSH client (SSH-2.0-OpenSSH_5.8p1 Debian-1ubuntu3) from 10.68.24.192 sent unsupported chann
What can be wrong ? Which failed publickey will be requested in which folder? /etc/sshd or /etc/sshd/root/.ssh/
Okay, i´ve createt /etc/sshd/root/.ssh/authorized_keys and /etc/sshd/root/.ssh/authorized_keys2 directory
It is not a directory, it is a file. How to setup public key authentication is described in details in System Administration Guide as well as in couple of KBs.
Okay, now it´s working ..... 😉
I have read over your hint that authorized_keys is "not" a directory.
After creating an renaming it to authorized_keys in the /etc/sshd/root/.ssh/ directory, everything is workin well ...
thx and br
Frank