Wednesday, 11 April 2012

Some interesting cmd of netapp


Some interesting cmd of netapp.
mkfile : this cmd is used to make the file on netapp, we can create file on any volume of netapp by this cmd .
the below is the example of this cmd.
vipul1*> mkfile 10kb  /vol/vipul/vipultree/uk
vipul1*> ls /vol/vipul/vipultree
uk
coverletter.txt
Data Migration Clariion to VNX using SAN Copy.pdf
Data Migration Clariion to VNX using SAN Copy1.pdf
Data Migration Clariion to VNX using SAN Copy2.pdf
rdfile : rdfile cmd is used to read the content of the file , so by this cmd we can see the content of any file in any volume.
For example:
vipul1*> rdfile /etc/uk
Vipul
dd: this cmd is used to copy the content of file data from on file to another, this cmd can be used in case of your ndmpcopy is not working.
For example:
vipul1*> dd if=/vol/vol0/etc/uk of=/vol/vol0/etc/vk
vipul1*> rdfile /etc/vk
Vipul
ls: this cmd is used to list the content of the directory .
for example.
vipul1*> ls /vol/vipul/vipultree
uk
coverletter.txt
Data Migration Clariion to VNX using SAN Copy.pdf
Data Migration Clariion to VNX using SAN Copy1.pdf
Data Migration Clariion to VNX using SAN Copy2.pdf
mv: this cmd is used to replace the old file to the new file this work in same volume but not between different volume
for example.
vipul1*> mv /vol/vol0/etc/vk /vol/vol0/etc/uk
vm_stat: gives the output of the wafl space allocation, gives stats of the wafl
for example.
vipul1*> vm_stat
System
        Total Pages in System: 130816
        Total Pages Allocated: 130567
        Total Free Pages: 249
        Non-WAFL Free Pages: 0
        WAFL Free Pages: 249
WAFL
        Pages From WAFL: 8867
        Pages Returned To WAFL: 2668
        Failures while stealing from WAFL: 0
        Times Pages stolen immediately: 8867
        Free Pages in WAFL: 7427
 Free buffers in WAFL: 74278
        WAFL recycled bufs: 3661
Sleep/Wakes
        Times thread slept for pages: 60
        Times woken up for pages: 60
        Times PTE is alloced while sleeping: 0
Hseg
             <8k   <16k   <64k  <512k   <2MB   <8MB  <16MB    big chunks        bytes
alloc          0    237    167    107      2      0      0      1    514     43069440
active         0      3      0      0      0      0      1      0      4      9359360
backup         0      0      0      0      0      0      0      0      0            0

Buffers MemoryPool
      1 portmap
      1 portmap
rm: this cmd is used to delete a file from the qtree.
For example.
vipul1*> ls /vol/vipul/vipultree
uk
coverletter.txt
vipul1*> rm /vol/vipul/vipultree/uk
vipul1*> ls /vol/vipul/vipultree
coverletter.txt
filersio: this cmd is used for the testing purpose , you can run this cmd and test your filer performance and to see if there is any issue.
For example.
vipul1*> filersio asyncio_active 50 -r 50 4 0 10m 60 5 /vol/vol0/filersio.test -                                                                                        create -print_stats 5
filersio: workload initiated asynchronously. Results will be displayed on the
console after completion
vipul1*> filersio: starting workload asyncio_active, instance 0

Read I/Os       Avg. read       Max. read       Write I/Os      Avg. write     M                                                                                        ax write
                latency(ms)     latency(ms)                     latency(ms)    l                                                                                        atency(ms)
16898           0               149             16926           1              8                                                                                        21
8610            0               22              8571            3              2                                                                                        641
5910            0               966             5715            5              2                                                                                        760
11449           0               17              11431           2              2                                                                                        500
11368           0               65              11426           2              2                                                                                        321
Wed Apr 11 18:00:00 IST [kern.uptime.filer:info]:   6:00pm up  2:41 0 NFS ops, 0                                                                                         CIFS ops, 0 HTTP ops, 0 FCP ops, 98 iSCSI ops
14116           0               18              13952           1              1                                                                                        151
8363            0               11              8580            2              2                                                                                        699
18068           0               31              17934           1              2                                                                                        780
10279           0               24              10292           2              1                                                                                        180
5690            0               15              5653            1              1                                                                                        399
Statistics for active_active model, instance 0
Running for 61s
Total read latency(ms)  31531
Read I/Os               113608
Avg. read IOPS          1862
Avg. read latency(ms)   0
Max read latency(ms)    966
Total write latency(ms) 275993
Write I/Os              113392
Avg. write IOPS         1858
Avg. write latency(ms)  2
Max write latency(ms)   3450
filersio: instance 0: workload completed successfully
hammer: this cmd again is good cmd for thesting the performance of your filer but it utilize the cpu power so much. It actually hammer the filer and record its performance. This cmd should be run under some netapp expert, don’t run it simply , because this is dangerous cmd and can create any panic to your filer.
For ecample;
vipul1*> hammer
usage: hammer [abort|pause|restart|status|
       [-f]<# Runs><fileName><# BlocksInFile> (<# Runs> == -1 runs hammer forever)|
       fill <writeSize> (use all available disk space)]
vipul1*> hammer -f 5 /vol/vol0/hammer.txt 400
vipul1*> Wed Apr 11 18:08:18 IST [blacksmith:warning]: blacksmith #0: Starting work.
Wed Apr 11 18:08:25 IST [blacksmith:info]: blacksmith #0: No errors detected. Stopping work
getXXbyYY: this cmd is very useful cmd to find out the information of user, host etc.. this cmd is used to take out the information from the filer , just look its sub cmd and then you will come to know that how useful this cmd is.
vipul1*> getXXbyYY help
usage: getXXbyYY <sub-command> <name>
Where sub-command is one of
gethostbyname_r - Resolves host name to IP address from configured DNS server, same as nslookup
gethostbyaddr_r - Retrieves IP address for host name from configured DNS server, same as reverse lookup
netgrp - Checks group membership for given host from LDAP/Files/NIS
getspwbyname_r - Displays user information using shadow file
getpwbyname_r - Displays user information including encrypted password from LDAP/Files/NIS
getpwbyuid_r - Same as above however you provide uid in this command rather than user name
getgrbyname - Displays group name and gid from LDAP/Files/NIS
getgrbygid - Same as above however you provide gid in this command rather than group name
getgrlist - Shows given user's gid from LDAP/Files/NIS
For more information, try 'man na_getXXbyYY'
vipul1*> getXXbyYY gethostbyname_r root
host entry for root not found: Host not found (authoritative)
vipul1*> getXXbyYY gethostbyname_r vipul
name: vipul
aliases:
IPv4 addresses: 192.168.1.14

All the above cmd  will only run either in diag mode or in advanced mode but will not run in normal mode.
Hope this blog will help you to play with some of the netapp hidden cmd.




No comments:

Post a Comment