Thursday, April 20, 2023

  

Commands for Displaying and Configuring System Message Logs

 describes commands that you can use to view or configure the system message logs. Most commands require admin-level access privileges. For detailed information on required access levels and commands, refer to the 
Brocade
®
 
Fabric
 
OS
®
 
Command
 
Reference
 
Manual
.
Commands for Viewing or Configuring System Parameters and Message Logs
Command
Description
auditCfg
Configures the audit message log.
auditDump
Displays or clears the audit log.
errClear
Clears all error log messages for all switch instances on this control processor (CP).
errDelimiterSet
Sets the error log start and end delimiter for messages pushed to the console.
errDump
Displays the entire error log, without page breaks. Use the -r option to show the messages in reverse order, from newest to oldest.
errFilterSet
Sets an error severity filter for the system console.
errModuleShow
Displays all defined error log modules.
errShow
Displays the entire error log, with page breaks. Use the -r option to show the messages in reverse order, from newest to oldest.
pdShow
Displays the contents of the panic dump and core dump files.
portErrShow
Displays the port error summary.
portLogClear
Clears the port log. If the port log is disabled, this command enables it.
portLogDisable
Disables the port log facility.
portLogDump
Displays the port log, without page breaks.
portLogDumpPort
Displays the port log of the specified port, without page breaks.
portLogEnable
Enables the port log facility.
portLogEventShow
Displays which port log events are currently being reported.
portLoginShow
Displays port logins.
portLogPdisc
Sets or clears the debug pdisc_flag.
portLogReset
Enables the port log facility.
portLogResize
Resizes the port log to the specified number of entries.
portLogShow
Displays the port log, with page breaks.
portLogShowPort
Displays the port log of the specified port, with page breaks.
portLogTypeDisable
Prevents an event from being reported in the port log. Port log events are described by the portLogEventShow command.
portLogTypeEnable
Configures an event to be reported in the port log. Port log events are described by the portLogEventShow command.
rasAdmin
Used to enable or disable logging for selected messages or modules, to change the default severity level for a specified message, to display configured RASLog message settings, and to enable or disable quiet time.
rasMan
Displays message documentation on the switch.
setVerbose
Sets the verbose level of a particular module within the Fabric OS.
Commands for Viewing or Configuring System Parametrs and Message Logs
Command
Description
snmpConfig
Manages the SNMP agent configuration.
supportFfdc
Enables and disables FFDC.
supportFtp
Sets, clears, or displays support FTP parameters or a time interval to check the FTP server.
supportSave
Collects RASLog, trace files, and supportShow (active CP only) information for the local CP and then transfers the files to an FTP server. The operation can take several minutes.
supportShow
Issues a list of diagnostic and error display commands. This output is used by your switch service provider to diagnose and correct problems with the switch. The output from this command is very long. Refer to the following related commands: 
supportShowCfgShow
—Displays the groups of commands enabled for display by the 
supportShow 
command. 
supportShowCfgEnable
—Enables a group of commands to be displayed under the 
supportShow 
command. 
supportShowCfgDisable
—Disables a group of commands under the supportShow command.
syslogadmin --set - facility
Changes the syslogd facility.
syslogadmin --set - ip
Adds an IP address as a recipient of system messages.
syslogadmin -- remove -ip
Removes an IP address as a recipient of system messages.
syslogadmin --show - ip
Displays the currently configured IP addresses that are recipients of system messages.
traceDump
Displays, initiates, or removes a Fabric OS module trace dump.

Dell EMC Virtual Appliance Manager 9.2.1 Installation Guide or unisphere vapp

 

Launching the vApp Manager

About this task

To launch the vApp Manager:

Steps

  1. Type one of the following URLs in a browser:
    • https://appliance_IP:unisphere_port_number
    • https://appliance_host_name:unisphere_port_number
    The default Unisphere port number is 5480.

    If the host IP address is an IPv6 address, surround the IP address with square brackets, for example:

    https://[2001:db8:ffff:ffff:ffff:ffff:ffff:ffff]:5480

    If the host IP address is an IPv4 address, type the IP address as normal, for example:

    https://198.51.100.255:5480

    For either of the URLs above, the browser is redirected, as shown in the following table.

    ORIGINAL URLREDIRECTED URL
    https://appliance_IP:unisphere_port_ numberhttps://appliance_IP:unisphere_port_ number/vappmgr/#/login
    https://appliance_host_name:unisphere_port_ numberhttps://appliance_IP:unisphere_port_ number/vappmgr/#/login
  2. On the log in panel, type seconfig for both the User and Password, and then click Login.
    The vApp Manager opens. For more information, see the vApp Manager online help.

Additional Information

SSH will need to be enabled after each reboot of the vApp. This is as designed.

The default credentials for SSH / CLI is cseadmin / cseadmin.

How to install Ansible on Centos7/RHEL

 How to install Ansible in Centos 7/RHEL 7?

$ sudo yum install wget -y
$ wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ sudo rpm -i epel-release-latest-7.noarch.rpm
$ sudo yum update -y 
$ sudo yum install ansible -y
$ systemctl stop firewalld
$ systemctl disable firewalld

Install Ansible via Pip in RHEL/CENTOS


$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py --insecure
$ python get-pip.py 
$ pip --version
$ python get-pip.py
$ pip uninstall ansible
$ pip install ansible
$ ansible --version

Brocade config backup and supportsave commands

 Before doing any kind of changes to a Brocade FC switch it’s a good idea to backup its config first. We backup Brocade switches using the configupload command.

Prerequisites – The switches need an FTP server to backup to.  You will need to know the IP address of the FTP server and a user account with access to proceed.

1 Establish a putty session to the switch and login as normal

2 Enter the command

configupload

3 At the protocol selection prompt choose the protocol appropriate for you FTP server. Press enter to select the default FTP

Protocol (scp, ftp, sftp, local) [ftp]

4 At the IP Address prompt enter the IP address of the FTP server

Server Name or IP Address [host]: 10.10.10.5

5 User Name, enter a user with access

User Name [user]

6 Path/filename, press enter to accept the home directory or enter path

Path/Filename [<home dir>/config.txt]:

7 Section, press enter to select all components or enter the element to backup

Section (all|chassis|switch [all]):

8 Go to your FTP server and you should see a file called config.txt.  Rename this to something logical like the switch name and date

Below is an example of all the steps completed

FCSWITCH01:admin> configupload
Protocol (scp, ftp, sftp, local) [ftp]:
Server Name or IP Address [host]: 10.10.10.5
User Name [user]: anonymous
Path/Filename [<home dir>/config.txt]:
Section (all|chassis|switch [all]):

  1. Use the “supportsave” CLI command. Be aware: This needs an FTP server to be configured and running on a management workstation reachable by the switch!

Example:

 

Supportsave

 

This command will collect RASLOG, TRACE, supportShow, core file, FFDC data and other support information and then transfer them to a FTP/SCP server or a USB device. This operation can take several minutes.
..
..
OK to proceed? (yes, y, no, n): [no] y
Host IP or Host Name: xxx.xxx.xxx.xxx
User Name: YYYY
Password:
Protocol (ftp or scp):

 

Your FTP server will receive multiple files. Please compress them and give the resulting archive file a meaningful name. For example:

TicketNumber_SwitchName_Date_Description.zip

Brocade switch reboot process

 

Description

Use this command to perform a "cold reboot" (power off/restart) of the control processor. This operation may be disruptive, and the command prompts for confirmation before executing. When you reboot a switch connected to a fabric, all traffic to and from that switch stops. All Fibre Channel ports on that switch including E_Ports become inactive until the switch comes back online.
The behavior of this command depends on the platform:
  • When issued on a standalone (single-processor) switch, this command performs a cold reboot of the switch.
  • When issued on an enterprise-class platform (Brocade X6-4 Director or Brocade X6-8 Director) with two CPs (active and standby), the following rules apply:
    • When the Standby CP reboots, it goes down and there is no failover because there is no traffic on that switch. When the Standby CP comes up again, it is temporarily no longer in sync with the Active CP.
    • When the Active CP reboots, it fails over to the Standby CP. The Standby CP becomes the new Active CP and traffic is disrupted.
    • When HA is in sync, and 
      reboot -f
       is issued on the Active CP of a director, the Standby CP takes over as the active CP without traffic disruption. If HA is not in sync, and 
      reboot -f
       is issued on the Active CP, the Standby CP takes over as the Active CP and traffic is disrupted.
    • When HA is disabled and 
      reboot
       or 
      reboot -f
       is issued on the Active CP, both the Active and Standby CPs reboot with the original mastership retained. The original Active CP remains the Active CP after the reboot, and the original Standby CP remains the Standby CP. After the reboot, HA is enabled.
    • When HA is disabled and 
      reboot
       or 
      reboot -f
       is issued on the Standby CP, the Standby CP reboots without prompting. It boots up with the default switch only, even if the Active CP has multiple logical switches configured. After the Standby CP boots up, HA is still disabled.

Notes

This command is subject to Virtual Fabric restrictions that may be in place. See "Using Fabric OS Commands" and "Command Availability" for details.

Operands

-f
Causes the CP to fail over to the Standby CP without affecting any of the Fibre Channel Ports. Note that the recommended way to force a failover without affecting any Fibre Channel ports is to issue the 
haFailover
 command.

Examples

To reboot a standalone switch with a single CP:
switch:admin>
reboot
Warning: This command would cause the switch to reboot
and result in traffic disruption.
Are you sure you want to reboot the switch [y/n]?
y
Rebooting! Sun Feb 28 19:49:45 2010...
The system is going down for reboot NOW !!
To reboot a CP when HA is enabled:
switch:admin>
reboot
Warning: This command is being run on a control processor (CP)
based system and will cause the active CP to reboot.
Are you sure you want to reboot the active CP [y/n]?
y
Rebooting! Sun Feb 28 19:49:45 2010...
The system is going down for reboot NOW !!
To reboot a CP when 
haFailover
 is disabled:
switch:admin>
reboot
This command is being run on a control processor (CP)
based system. Because HA is disabled, it will cause both
active CP and the standby CP to reboot. After reboot, the
HA will be enabled.
Do you want to continue [y/n]
y
Rebooting! Sun Feb 28 19:49:45 2010...
The system is going down for reboot NOW !!

Tuesday, February 14, 2023

Azure Powershell commands

- To connect azure subscription from powershell.


Connect-AzAccount 

- if Connect-AzAccount does not connect properly use below command.

Connect-AzAccount -DeviceCode

WARNING: To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code D3DWL7T2R to authenticate.

- Type below command to check available subscription.

Get-AzSubscription

- To switch the subscription use below command.

Set-AzContext -Subscription {293caa52-ebff-42e6-9e6f-xxxxxxxx subscription id}

once you switch the subscription you can check resource of that subscription.


- Use below command to check resource group

Get-AzResourceGroup

use below to check formated info about resource group.

Get-AzResource | Format-Table

- use below command to create vm instance

New-AzVm -ResourceGroupName learn-6d075fba-929b-432a-89c7-xxxxxxx -Name "testvm-eus-01" -Credential (Get-Credential) -Location "eastus" -Image Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest -OpenPorts 22 -PublicIpAddressName "testvm-01"