How To
Summary
The tcpdump command fails with one of:
tcpdump: bpf_load: genminor failed: No such file or directory
tcpdump: bpf_load: genminor failed: Error 0
tcpdump: no suitable device found
Steps
# netstat -in
# cp /etc/objrepos/CuDvDr /tmp/
# odmget CuDvDr > /tmp/odmget-CuDvDr.outIf there are any bpf minor devices in the ODM for the bpf major number, with "value3" set to something other than "bpf", remove them both from the ODM and /dev directory. For instance, for bpf major number 42, the non-bpf minor device instance is "uuvvlv_xyz6".
$ cat odmget-CuDvDr.out | grep -ip bpf
CuDvDr:
resource = "ddins"
value1 = "bpf"
value2 = "42"
value3 = ""CuDvDr:
resource = "devno"
value1 = "42"
value2 = "1"
value3 = "uuvvlv_xyz6"# odmdelete -q value3=<ex: uuvvlv_xyz6> -o CuDvDr
Ex:
5th column below is the bpf major number.
# ls -l /dev | awk '/42/{print $0}'
crw-rw---- 1 root system 42, 2 Jun 22 17:46 ruuvvlv_xyz6
brw-rw---- 1 root system 42, 1 Jun 22 17:46 uuvvlv_xyz6# rm /dev/ruuvvlv*
# rm /dev/uuvvlv*Next, check for any existing bpf files in "/dev" with non-bpf device major number. If any exist without the associated major number device object in the ODM, remove them.
For instance, for bpf device in ODM with major number 42:
# odmget CuDvDr | grep -ip "value1\ =\ \"bpf"
CuDvDr:
resource = "ddins"
value1 = "bpf"
value2 = "42"
value3 = ""if any bpf files exist in "/dev" directory with non-bpf major number, for ex:51:
# ls -al /dev/bpf*
example:
cr-------- 1 root system 51, 0 Jul 26 22:28 /dev/bpf0
cr-------- 1 root system 51, 1 Jul 26 22:28 /dev/bpf1if there are no associated major number devices in ODM:
# odmget CuDvDr | grep -ip "value2\ =\ \"51"
<blank output>
# rm /dev/bpf<n> replace "n" with the bpf minor device number ex: bpf0, bpf1 and so on.
# savebase
# reboot
# tcpdump -D
Step 2:
Either if the LPAR cannot be rebooted now or if the scenarios in the step 1 do not exist, go through these instructions. If problem persists, LPAR must be rebooted.
# tcpdump -D
# mknod /dev/bpf<n> c <bpf major number ex: 42> <n>
# mknod /dev/bpf<n+1> c <bpf major number> <n+1>
# mknod /dev/bpf<n+2> c <bpf major number> <n+2>
# mknod /dev/bpf<n+3> c <bpf major number> <n+3>
# chmod 400 /dev/bpf<n>
# chmod 400 /dev/bpf<n+1>
# chmod 400 /dev/bpf<n+2>
# chmod 400 /dev/bpf<n+3>
# odmget CuDvDr | grep -ip "value1\ =\ \"bpf" | grep -i value2
value2 = "36"
# odmget CuDvDr | grep -ip "value1\ =\ \"<bpf major number from output above, ex:36>" | grep -i value2
value2 = "0"
....
value2 = "6"
b) However, if the max number of 20 bpf minor devices already exist for the bpf major number, try to free up one of the bpf minor devices being used.
# lssrc -a | grep -i iptrace
# stopsrc -s iptrace
# ps -ef | grep -i iptrace
# kill -9 <iptrace process pid>
# iptrace -u
iptrace: unload success!
List out the process PIDs that are using the bpf minor devices
# fuser -cux /dev/bpf*
# ps -ef | grep <Process PID from the above output>
# kill -9 <Process PID>
If problem persists, reboot the LPAR.
# tcpdump
or
# /usr/lib/methods/cfgbpf
Step 3:
-- Remove existing snap
# snap -r
# mkdir -p /tmp/ibmsupt/testcase
# script /tmp/ibmsupt/testcase/'hostname'-script.out
# cp /etc/syslog.conf /etc/syslog.conf.bak
# echo "*.debug /tmp/ibmsupt/testcase/syslog.out" >> /etc/syslog.conf
# touch /tmp/ibmsupt/testcase/syslog.out
# refresh -s syslogd
# odmget CuDvDr > /tmp/ibmsupt/testcase/before-CuDvDr.out
# ls -l /dev/bpf*
# tcpdump -D
# <run the tcpdump command that failed>
# ls -l /dev/bpf*
# odmget CuDvDr > /tmp/ibmsupt/testcase/after-CuDvDr.out
Collect snap data
# snap -aZc
# exit
# mv /tmp/ibmsupt/snap.pax.Z /tmp/ibmsupt/<Case number>-snap.pax.Z
Additional Information
SUPPORT:
If additional assistance is required after completing all of the instructions provided in this document, please follow the step-by-step instructions below to contact IBM to open a case for software under warranty or with an active and valid support contract. The technical support specialist assigned to your case will confirm that you have completed these steps.
a. Document and/or take screen shots of all symptoms, errors, and/or messages that might have occurred
b. Capture any logs or data relevant to the situation.
c. Contact IBM to open a case:
-For electronic support, please visit the IBM Support Community:
https://www.ibm.com/mysupport
-If you require telephone support, please visit the web page:
https://www.ibm.com/planetwide/
d. Provide a good description of your issue and reference this technote
e. Upload all of the details and data to your case
-You can attach files to your case in the IBM Support Community
-Or Upload data to IBM testcase server analysis:
http://www.ibm.com/support/docview.wss?uid=ibm10733581
f. Click here to submit feedback for this document.
Related Information
Was this topic helpful?
Document Information
Modified date:
11 December 2024
UID
ibm16841759