add hcnmgr man page
This commit is contained in:
parent
1f084d071c
commit
a6b1f64ffb
118
powerpc-utils-1.3.8-hcnmgr.patch
Normal file
118
powerpc-utils-1.3.8-hcnmgr.patch
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
diff -up powerpc-utils-1.3.8/man/hcnmgr.8.me powerpc-utils-1.3.8/man/hcnmgr.8
|
||||||
|
--- powerpc-utils-1.3.8/man/hcnmgr.8.me 2020-10-01 13:09:19.969454947 +0200
|
||||||
|
+++ powerpc-utils-1.3.8/man/hcnmgr.8 2020-10-01 13:09:29.969148204 +0200
|
||||||
|
@@ -0,0 +1,35 @@
|
||||||
|
+.TH hcnmgr "01 October 2020" "Linux" "Linux on Power Service Tools"
|
||||||
|
+.RS
|
||||||
|
+hcnmgr contains a set of commands to support migratable SR_IOV logical port.
|
||||||
|
+The new commands configure/query/remove network devices. New commands should
|
||||||
|
+be called from the HMC, rather than directly from linux LPAR
|
||||||
|
+.PP
|
||||||
|
+Usage: hcncfgdrc DRC_INDEX=<drc_index> [STAKE_TOKEN=NULL] [\fB-d\fP]
|
||||||
|
+Configure a device to hybrid network HCN
|
||||||
|
+.PP
|
||||||
|
+Usage: hcnrmhcn HCN_ID=<hcnid>
|
||||||
|
+Remove a hybrid network HCN given an HCN ID
|
||||||
|
+.PP
|
||||||
|
+Usage: hcnrmdev DRC_INDEX=<drc_index> HCN_ID=<hcnid>
|
||||||
|
+Unconfigure device from HCN
|
||||||
|
+.PP
|
||||||
|
+Usage: hcnqrydev DRC_INDEX=<drc_index> HCN_ID=<hcnid>
|
||||||
|
+Query a device given a DRC_INDEX or HCN ID
|
||||||
|
+.PP
|
||||||
|
+Usage: hcnversion
|
||||||
|
+get the current version of the HCN support
|
||||||
|
+.PP
|
||||||
|
+Optional arguments.
|
||||||
|
+.RS
|
||||||
|
+.TP
|
||||||
|
+.B
|
||||||
|
+\fB-s\fP
|
||||||
|
+scan device-tree and configure HCN
|
||||||
|
+.TP
|
||||||
|
+.B
|
||||||
|
+\fB-V\fP
|
||||||
|
+Display version information and exit
|
||||||
|
+.TP
|
||||||
|
+.B
|
||||||
|
+\fB-h\fP
|
||||||
|
+Display this help information and exit
|
||||||
|
diff -up powerpc-utils-1.3.8/scripts/hcnmgr.me powerpc-utils-1.3.8/scripts/hcnmgr
|
||||||
|
--- powerpc-utils-1.3.8/scripts/hcnmgr.me 2020-10-01 13:03:10.839439027 +0200
|
||||||
|
+++ powerpc-utils-1.3.8/scripts/hcnmgr 2020-10-01 13:06:18.479509944 +0200
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#! /bin/bash
|
||||||
|
+#!/usr/bin/bash
|
||||||
|
|
||||||
|
# Copyright (c) 2020 International Business Machines
|
||||||
|
#
|
||||||
|
@@ -562,34 +562,7 @@ scanhcn() {
|
||||||
|
# Main
|
||||||
|
#
|
||||||
|
|
||||||
|
-#All echo messages goes into $LOG_FILE
|
||||||
|
-exec &> >(tee -a $LOG_FILE)
|
||||||
|
-
|
||||||
|
-#Start debug log $LOG_FILE with date and time
|
||||||
|
-NOW=$(date +"%m-%d-%Y %T")
|
||||||
|
-echo "=======================$NOW============================"
|
||||||
|
-
|
||||||
|
-#Validate this tool is running on powerpc platform
|
||||||
|
-. "$PSERIES_PLATFORM"
|
||||||
|
-if [ "$platform" != "$PLATFORM_PSERIES_LPAR" ]; then
|
||||||
|
- err $E_EPERM
|
||||||
|
-fi
|
||||||
|
-
|
||||||
|
-#Validate NMCLI packages is install to manage networking
|
||||||
|
-if ! nmcli --version >/dev/null 2>&1; then
|
||||||
|
- err $E_ENETUNREACH
|
||||||
|
-fi
|
||||||
|
-
|
||||||
|
-#Validate bonding module is loaded
|
||||||
|
-if ! lsmod | grep -q bonding; then
|
||||||
|
- hcnlog DEBUG "HCNMGR: Bonding module not loaded, load module ..."
|
||||||
|
- if ! modprobe bonding; then
|
||||||
|
- err $E_NOMODULE
|
||||||
|
- fi
|
||||||
|
-fi
|
||||||
|
-
|
||||||
|
HCNCMD=$(basename "$0")
|
||||||
|
-hcnlog DEBUG "$HCNCMD enter"
|
||||||
|
|
||||||
|
#getops for help and version
|
||||||
|
while getopts "sVhd:" arg; do
|
||||||
|
@@ -616,6 +589,34 @@ while getopts "sVhd:" arg; do
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
+#All echo messages goes into $LOG_FILE
|
||||||
|
+exec &> >(tee -a $LOG_FILE)
|
||||||
|
+
|
||||||
|
+hcnlog DEBUG "$HCNCMD enter"
|
||||||
|
+
|
||||||
|
+#Start debug log $LOG_FILE with date and time
|
||||||
|
+NOW=$(date +"%m-%d-%Y %T")
|
||||||
|
+echo "=======================$NOW============================"
|
||||||
|
+
|
||||||
|
+#Validate this tool is running on powerpc platform
|
||||||
|
+. "$PSERIES_PLATFORM"
|
||||||
|
+if [ "$platform" != "$PLATFORM_PSERIES_LPAR" ]; then
|
||||||
|
+ err $E_EPERM
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+#Validate NMCLI packages is install to manage networking
|
||||||
|
+if ! nmcli --version >/dev/null 2>&1; then
|
||||||
|
+ err $E_ENETUNREACH
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+#Validate bonding module is loaded
|
||||||
|
+if ! lsmod | grep -q bonding; then
|
||||||
|
+ hcnlog DEBUG "HCNMGR: Bonding module not loaded, load module ..."
|
||||||
|
+ if ! modprobe bonding; then
|
||||||
|
+ err $E_NOMODULE
|
||||||
|
+ fi
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
#Log this scripts command line to syslog
|
||||||
|
hcnlog INFO "$HCNCMD $*"
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: powerpc-utils
|
Name: powerpc-utils
|
||||||
Version: 1.3.8
|
Version: 1.3.8
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Utilities for PowerPC platforms
|
Summary: Utilities for PowerPC platforms
|
||||||
|
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
@ -36,6 +36,7 @@ Patch3: powerpc-utils-1.3.5-pseries_platform-man.patch
|
|||||||
Patch4: powerpc-utils-1.3.5-update_flash_nv.patch
|
Patch4: powerpc-utils-1.3.5-update_flash_nv.patch
|
||||||
Patch5: powerpc-utils-1.3.8-install-man.patch
|
Patch5: powerpc-utils-1.3.8-install-man.patch
|
||||||
Patch6: powerpc-utils-manpage-lparstat.patch
|
Patch6: powerpc-utils-manpage-lparstat.patch
|
||||||
|
Patch7: powerpc-utils-1.3.8-hcnmgr.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Utilities for PowerPC platforms.
|
Utilities for PowerPC platforms.
|
||||||
@ -191,6 +192,7 @@ systemctl daemon-reload >/dev/null 2>&1 || :
|
|||||||
%{_mandir}/man8/uspchrp.8*
|
%{_mandir}/man8/uspchrp.8*
|
||||||
%{_mandir}/man8/vcpustat.8.gz
|
%{_mandir}/man8/vcpustat.8.gz
|
||||||
%{_mandir}/man8/smtstate.8.gz
|
%{_mandir}/man8/smtstate.8.gz
|
||||||
|
%{_mandir}/man8/hcnmgr.8*
|
||||||
|
|
||||||
%files core
|
%files core
|
||||||
%license COPYING
|
%license COPYING
|
||||||
@ -206,6 +208,9 @@ systemctl daemon-reload >/dev/null 2>&1 || :
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 01 2020 Than Ngo <than@redhat.com> - 1.3.8-3
|
||||||
|
- add hcnmgr man page
|
||||||
|
|
||||||
* Thu Oct 01 2020 Than Ngo <than@redhat.com> - 1.3.8-2
|
* Thu Oct 01 2020 Than Ngo <than@redhat.com> - 1.3.8-2
|
||||||
- clean up systemd service
|
- clean up systemd service
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user