24 Ekim 2020 Cumartesi

OpsCenter / Data collection failing after upgrade to OpsCenter 8.3.1

8.3.1 upgrdae sonrası datacollection sorunu içi aşağıdaki şekilde adımlar uygulanabilir.

1. OpsCenter üzerinde tüm master sunucular için data collection disable edilir

2. Update için Update_SQL.sql dosyası, delete için de Delete_SQL.sql C:\Temp altında oluşturulur

update domain_Entity set entityType = 14 where id in (select id from domain_MasterServer); commit;

delete from nb_VirtualMachines where clientId in (select id from domain_MasterServer); commit;

3. C:\Program Files\Symantec\Opscenter\server\bin altından çalıştırılır

Open cmd as administrator and run: 
C:\Program Files\Symantec\Opscenter\server\bin\loadsql.bat "C:\Temp\Update_SQL.sql" 
C:\Program Files\Symantec\Opscenter\server\bin\loadsql.bat "C:\Temp\Delete_SQL.sql" 


Problem

After upgrading an OpsCenter server to version 8.3, data collection stops.

However, note that data collection is being performed, but the data is not visible in the OpsCenter web GUI.

After the upgrade, all master servers would show in Monitor > Hosts > Masters. After data collection is re-enabled, they would disappear from Monitor > Hosts > Masters as their entitytype was changing.

Cause

This issue was caused by a regression of VMWare Aliasing related changes to the 8.3 code base.

Solution

Veritas is aware of this issue and is working on integrating the solution into an upcoming release. Until then, the following steps may be performed.

1. Make a copy of the OpsCenter database using the dbbackup command (just in case!).

2. Disable OpsCenter data collection for all masters.

3. Run the following SQL script (see below note Running SQL scripts for more information):

update domain_Entity set entityType = 14 where id in (select id from domain_MasterServer); commit;

4. Run the following SQL script (see below note Running SQL scripts for more information):

delete from nb_VirtualMachines where clientId in (select id from domain_MasterServer); commit;

5. Restart OpsCenter Services

6. Enable OpsCenter data collection and verify proper operation.


Note: Running SQL scripts

You may use any of the following methods:

Sybase Central

dbisql

loadsql

Note that loadsql (.bat for Windows, .sh for Linux) requires that the scripts shown should be written to a file with a .sql or .txt extension.

Sybase Central is a free download, but customers may not allow additional software such as this to be installed, whereas loadsql and dbisql are included with the OpsCenter installation. See relevant documentation on the use of these tools.

If you do not feel confident performing these steps, please contact Veritas Support Services and/or open a support case for assistance.

https://www.veritas.com/content/support/en_US/article.100048466


19 Ekim 2020 Pazartesi

Active Directory / Get-ADComputer

Belirli bir versiyondaki computer hesaplarını listelemek için

Get-ADComputer -Filter 'operatingsystem -like "*Windows Server 2016*"'     -Properties Name,Operatingsystem | Sort-Object -Property Name |Select-Object -Property Name,Operatingsystem | ConvertTo-Html | Out-File C:\List_Windows_Server_2016.htm

12 Ekim 2020 Pazartesi

Active Directory / Grup üyeliklerini listeleme

Grup üyeliklerini listeleme


Import-Module ActiveDirectory


    $Groups = (Get-AdGroup -filter * | Where {$_.name -like "GRUP_ADI"} |         select name -ExpandProperty name)


    $Table = @()


    $Record = @{

      "Group Name" = ""

      "Name" = ""

      "Username" = ""

      "mail" = ""

    }



    Foreach ($Group in $Groups) {


      $Arrayofmembers = Get-ADGroupMember -identity $Group -recursive |         select name,samaccountname


      foreach ($Member in $Arrayofmembers) {

        $Record."Group Name" = $Group

        $Record."Name" = $Member.name

        $Record."UserName" = $Member.samaccountname

        $objRecord = New-Object PSObject -property $Record

        $Table += $objrecord


      }

    }


    $Table | export-csv "C:\GRUP_ADI.csv" -NoTypeInformation

9 Ekim 2020 Cuma

Active Directory / Get-aduser -filter * -SearchBase

Belirli bir OU içerisindeki kullanıcıların istenilen özelliklerini listelemek 

Get-aduser -filter * -SearchBase 'distinguishedName' -properties * |select Name, DistinguishedName, passwordlastset, Passwordneverexpires, LastBadPasswordAttempt, CannotChangePassword | export-csv C:\AD_USER.csv -Append

Docker / pull centos

docker pull centos

docker run -d -t --name test001 centos


Linux / SUSEConnect -list-extensions

 hostname:~ # SUSEConnect -list-extensions

AVAILABLE EXTENSIONS AND MODULES

    Advanced Systems Management Module 12 x86_64

    Activate with: SUSEConnect -p sle-module-adv-systems-management/12/x86_64

    Containers Module 12 x86_64

    Activate with: SUSEConnect -p sle-module-containers/12/x86_64

    HPC Module 12 x86_64

    Activate with: SUSEConnect -p sle-module-hpc/12/x86_64

    Legacy Module 12 x86_64

    Activate with: SUSEConnect -p sle-module-legacy/12/x86_64

    Public Cloud Module 12 x86_64

    Activate with: SUSEConnect -p sle-module-public-cloud/12/x86_64

    SUSE Linux Enterprise High Availability GEO Extension 12 SP4 x86_64

    Activate with: SUSEConnect -p sle-ha-geo/12.4/x86_64 -r ADDITIONAL REGCODE

    SUSE Linux Enterprise Live Patching 12 SP4 x86_64

    Activate with: SUSEConnect -p sle-live-patching/12.4/x86_64 -r ADDITIONAL REGCODE

    SUSE Linux Enterprise Point of Service Image Server 12 SP2 x86_64

    Activate with: SUSEConnect -p sle-pos/12.2/x86_64 -r ADDITIONAL REGCODE

    SUSE Linux Enterprise Server LTSS 12 SP4 x86_64

    Activate with: SUSEConnect -p SLES-LTSS/12.4/x86_64 -r ADDITIONAL REGCODE

    SUSE Linux Enterprise Software Development Kit 12 SP4 x86_64

    Activate with: SUSEConnect -p sle-sdk/12.4/x86_64

    SUSE Linux Enterprise Workstation Extension 12 SP4 x86_64

    Activate with: SUSEConnect -p sle-we/12.4/x86_64 -r ADDITIONAL REGCODE

    SUSE Package Hub 12 SP4 x86_64

    Activate with: SUSEConnect -p PackageHub/12.4/x86_64

    Toolchain Module 12 x86_64

    Activate with: SUSEConnect -p sle-module-toolchain/12/x86_64

    Web and Scripting Module 12 x86_64

    Activate with: SUSEConnect -p sle-module-web-scripting/12/x86_64

MORE INFORMATION

You can find more information about available modules here:

https://www.suse.com/products/server/features/modules.html

8 Ekim 2020 Perşembe

Linux / SUSE register

SUSEConnect -r YourActivationCode -e YourEmailAddress


hostname:~ # SUSEConnect --cleanup    For register cleanup

Error: Invalid system credentials, probably because the registered system was deleted in SUSE Customer Center. 
Check https://scc.suse.com whether your system appears there. If it does not, please call SUSEConnect --cleanup and re-register this system.

hostname:~ # SUSEConnect -r YourActivationCode -e YourEmailAddress    For register

Registered SLES_SAP 12.4 x86_64

To server: https://scc.suse.com

Using E-Mail: email@domain.com

Successfully registered system.

Linux / dmidecode

Fiziksel sanal kontrolü için dmidecode uygulaması ile kontrol edebiliriz.


dmidecode | grep Product

dmidecode -t system

Linux / Storage Command Line Tool

storcli64 show all

storcli64 /c4 show all

storcli64 /c4/dall show all

storcli64 /c1/e28/s12 show rebuild


hostname:~ # storcli64

     Storage Command Line Tool  Ver 1.18.11 Feb 09, 2016

     (c)Copyright 2015, AVAGO Corporation, All Rights Reserved.

help - lists all the commands with their usage. E.g. storcli help

<command> help - gives details about a particular command. E.g. storcli add help

List of commands:

Commands   Description

-------------------------------------------------------------------

add        Adds/creates a new element to controller like VD,Spare..etc

delete     Deletes an element like VD,Spare

show       Displays information about an element

set        Set a particular value to a property

get        Get a particular value to a property

compare    Compares particular value to a property

start      Start background operation

stop       Stop background operation

pause      Pause background operation

resume     Resume background operation

download   Downloads file to given device

expand     expands size of given drive

insert     inserts new drive for missing

transform  downgrades the controller

/cx        Controller specific commands

/ex        Enclosure specific commands

/sx        Slot/PD specific commands

/vx        Virtual drive specific commands

/dx        Disk group specific commands

/fall      Foreign configuration specific commands

/px        Phy specific commands

/[bbu|cv]  Battery Backup Unit, Cachevault commands


Other aliases : cachecade, freespace, sysinfo


Use a combination of commands to filter the output of help further.

E.g. 'storcli cx show help' displays all the show operations on cx.

Use verbose for detailed description E.g. 'storcli add  verbose help'

Use 'page=[x]' as the last option in all the commands to set the page break.

X=lines per page. E.g. 'storcli help page=10'

Use J as the last option to print the command output in JSON format

Command options must be entered in the same order as displayed in the help of

the respective commands.

Windows Server IIS üzerinden hizmet veren bir FTP servisine erişmek istediğimizde;  Internet Explorer, FileZilla vb. uygulamalar ile erişim ...