Showing posts with label infrastructure. Show all posts
Showing posts with label infrastructure. Show all posts

Wednesday, March 7, 2018

Custom Stencils Datacenter Design

MS Visio Professional 2013

download stencils
http://www.visiocafe.com/hpe.htm

extract stencils files
C:\Users\xxx\Documents\My Shapes

Visio Menu
Shapes-More Shapes-My Shapes

Monday, February 12, 2018

Linux Administrator Daily Tasks


  • ------------------------------------------Filesystem------------------------------------------


 # mount -o loop,offset=$((10860003 * 512)) disk.img /mnt
blkid
lsblk -f
mount -l
lshw -short
file -Ls
dmesg

format a USB storage device with FAT32 file system
mkfs –t vfat <USB-device-mount-point>

find out the USB device mount point
fdisk -l


mkfs.ext4 <USB-device-mount-point>
mkfs.ntfs <USB-device-mount-point>

unmount the drive,you can’t format a mounted drive.
fdisk -l
sudo umount /dev/sdb1
sudo mkfs.vfat /dev/sdb1
sudo mkfs.ntfs /dev/sdb1

man mkfs.ntfs
man mkfs.vfat

Set label name to USB drives
sudo mkfs.vfat /dev/sdb1 -n sk


  • ------------------------------------------System------------------------------------------

denyhosts
top
top -u sunsail
vmstat
w
uptime
ps
free
iostat
mpstat
pmap
cat /proc/cpuinfo
cat /proc/meminfo
cat /proc/zoneinfo
cat /proc/mounts
cat /etc/issue
uname -r
paste
lsblk -l
uname
history
sudo
mkdir
touch
chmod
chown
tar
date
ptree
pkill
killall

view the amount of free disk space
df –h

list files sorted by size
ls –lSr

see how much space /some/dir is consuming
du -sh /some/dir

List all running processes containing the string stuff
ps aux | grep stuff


extracting entire archive
tar -zxvf backup.tar.gz

extract .xz file
unxz tor-browser-linux32-5.5.4_en-US.tar.xz
tar xvf tor-browser-linux32-5.5.4_en-US.tar

extract .bz2 file
bzip2 -dk FileZilla_3.29.0_x86_64-linux-gnu.tar.bz2
tar xvf FileZilla_3.29.0_x86_64-linux-gnu.tar

linux version
lsb_release -a
cat /etc/issue
cat /etc/os-release
cat /etc/lsb-release
cat /etc/*-release
cat /proc/version

kernel version
uname -r

32x 64x query
uname –m
This displays only the machine hardware name and indicates, as above, whether your system is 32-bit (“i686” or “i386”) or 64-bit (“x86_64”)
The “arch” command is similar to the “uname -m” command and prints to the screen whether your system is 32-bit (“i686”) or 64-bit (“x86_64”)
~$ arch
i686
The “arch” command is similar to the “uname -m” command and prints to the screen whether your system is 32-bit (“i686”) or 64-bit (“x86_64”)
~$ arch
i686

virtual machine check
On Linux
$ dmesg |grep -i hypervisor
$ dmidecode -s system-manufacturer

watch is used to run any designated command at regular intervals.
watch -n 5 "ls -l | wc l"

md5sum ubuntu-6.10-desktop-i386.iso
sha256sum ubuntu-9.10-dvd-i386.iso

Validating the Files On Microsoft Windows GUI
https://wiki.centos.org/TipsAndTricks/sha256sum


iw distinguishes between wireless LAN hardware devices (the physical layer, referred to as phy) and the network interface configured to use that hardware (e.g. wlan0,
similar to an Ethernet eth0 interface). To see the list of devices, and interfaces for each device
iw dev


configure it to start Automatically while system start-up
# chkconfig tgtd on
verify that the run level configured correctly for the tgtd service
# chkconfig --list tgtd

identify processes using files, directories, or sockets
Who is Using a File or Directory
$ fuser  .
$ fuser -v ./
Check Processes Using TCP/UDP Sockets
fuser -v -n tcp 5000
the processes that are using my 'home' directory
$ fuser ~
$ fuser ~ -v
check for the root directory
$ fuser /
$ fuser / -v
$ fuser -v /home/ismail
$ fuser -v -m /home/ismail/.bashrc
$ fuser -v -n tcp 8080
$ fuser -v -n udp 53
kill this TCP listener, you can use option -k
fuser -i -k 8080/tcp
shows all processes at the (local) TELNET port
fuser telnet/tcp
list signals
fuser -l
STOP a process
fuser -i -k STOP [FILE/DIRECTORY]
kills all processes accessing the file system /home
fuser -km /hom


  • ------------------------------------------Networking------------------------------------------


netstat
iptraf
tcpdump
strace
nmap

list open files
lsof
list open files owned by user
lsof -u user1
list open file via tcp
lsof -i TCP:1-1024
lsof -i TCP:80
PID 27808
lsof -Pan -p 27808 -i
lsof -p 2


ifconfig
ifconfig -a
ifconfig  eth0 up
ifconfig  eth0 down
ifconfig  eth0 192.168.70.131
ifconfig  eth0 netmask 255.255.255.0
ifconfig  eth0 broadcast 192.168.70.255


list out all connections
ss|less
Filter out tcp,udp or unix connections
ss -t
ss -A tcp
ss -u
ss -x
List all udp connections
ss -ua
ss -a -A udp
ss -nt
ss -ltn
udp
ss -lun
prints out the statistics
ss -s




netstat -a
netstat -at
netstat -s
netstat -au
netstat -l
netstat -lu
netstat -lt
netstat -tulpn  ## To output numerical service sockets
netstat -plan
netstat -plan | grep ":80"
-p, --program Show the PID and name of the program to which each socket belongs.
# netstat -anp

Messaging
wall
write
talk

Get the PCI address of the NIC:
# lspci | grep Mellanox

Check what ethernet devices exist currently
# ls -al /sys/class/net
# ls  /sys/class/net



look at the last ten lines of /var/log/messages
$ sudo tail /var/log/messages
someone last log in to the system
# lastlog
 the system last rebooted
 # last reboot
 the login history of users
 # last | grep sysadmin

 temporary set the IP address
 ifconfig eth0 192.168.8.185
 ifconfig eth0 192.168.8.185 netmask 255.255.255.0 up
 temporary change the MAC address
 ifconfig eth0 down hw ether AA:BB:CC:DD:EE:FF && ifconfig eth0 up



  • **Network Troubleshooting 

ping 192.168.0.2                          # ping a host
netstat -nr                                    #show routing table without resolving domain names
netstat -ni                                    # show informations about errors/collisions
traceroute www.example.com  # find route to example.com
tcpdraceroute www.example.com  # find route to example.com using tcptraceroute (which uses tcp to discover path).

netstat -i -I em0                          # show statistics about your network card
sockstat -c                                 # show connected sockets
sockstat -l                                  # show listening sockets and processes

arp -na                                       # show arp table
arp -d 192.168.0.2                     # delete a record from arp table
arp -s 192.168.0.2  00:10:b5:99:bf:c4       # add a static record in arp table

tcpdump -tlni em0                      # listen on em0 network interface and sniff packets that pass via em0
tcpdump -tlni em0 -n icmp       # listen for ICMP traffic on em0 network interface
tcpdump -i nfe0 -c1 -n -s0 -vvvv icmp    # capture one ICMP packet and decode itvagran

windows administrator daily tasks

  • Active Directory

To quickly list all the groups in your domain, with members
dsquery group -limit 0 | dsget group -members –expand

To find all users whose accounts are set to have a non-expiring password
dsquery * domainroot -filter “(&(objectcategory=person)(objectclass=user)(lockoutTime=*))” -limit 0

To list all the FSMO role holders in your forest
netdom query fsmo

To refresh group policy settings
gpupdate

To list all applied GPO on client machine
gpresult /H c:/tmp/policy.html

To check Active Directory replication on a domain controller
repadmin /replsummary

To force replication from a domain controller without having to go through to Active Directory Sites and Services
repadmin /syncall

To see what server authenticated you (or if you logged on with cached credentials) you can run either of these commands:
set l
echo %logonserver%

To see what security groups you belong to
whoami

To see what security groups you belong to
whoami /groups

To see the domain account policy (password requirements, lockout thresholds, etc)
net accounts


  • Windows Networking

To quickly reset your NIC back to DHCP with no manual settings,
netsh int ip reset all

To quickly generate a text summary of your system
systeminfo | more

To see all network connections your client has open
net use

To see your routing table, run either of these commands
route print
netstat -r


Need to run a trace
netsh trace start capture=yes tracefile=c:\capture.etl
netsh trace stop

To add an entry to your routing table that will be permanent, run the route add command with the –p option
route add 0.0.0.0 mask 0.0.0.0 172.16.250.5 –p

to see all open network connections, refreshing every second
netstat –ano 1
netstat –ano 8
netstat –ano 40

add a | findstr value to watch for only a specific connection, like a client ip.addr or port
netstat –ano | findstr 216.134.217.20
netstat –ano 1| findstr 216.134.217.20
netstat –ano 50| findstr 216.134.217.20
netstat -ano 1 | findstr :139
netstat -ano 50 | findstr :139

List out all connections
netstat -a

List only TCP connections
netstat -at

List only UDP connections
netstat -au

Disable reverse dns lookup for faster output
netstat -ant

List out only listening connections
netstat -tnl

Get process name/pid and user id
netstat -nlpt
netstat -ltpe

Print statistics
netstat -s


Display kernel routing information
netstat -rn

Print network interfaces
netstat -i

Get netstat output continuously
netstat -ct


ipconfig /all                             IP Configuration (Display Connection Configuration)
ipconfig /displaydns                 IP Configuration (Display DNS Cache Contents)
ipconfig /flushdns                     IP Configuration (Delete DNS Cache Contents)
ipconfig /release                     IP Configuration (Release All Connections)
ipconfig /renew                         IP Configuration (Renew All Connections)
ipconfig /registerdns             IP Configuration (Refreshes DHCP & Re-Registers DNS)
ipconfig /showclassid             IP Configuration (Display DHCP Class ID)
ipconfig /setclassid                 IP Configuration (Modifies DHCP Class ID)

to shutdown or reboot a machine, including your own, in a simple scheduled task
shutdown –r –t 0 –m \\localhost

Scan for open ports for specific IP/host
nmap -n -sV 192.168.1.4
Scan for open ports for a network
nmap -n -sV 192.168.1.0/24


  • Windows Administration

to enable the local administrator account
net user administrator * /active:yes

see all the open files on a system
openfiles /query

reset IIS without having to reboot the whole server
iisreset

To check if server is virtual.
On Windows
CMD:
Systeminfo | findstr /i model
powershell:
gwmi -q "select * from win32_computersystem"

determine if the current version of Windows is either 32-bit or 64-bit from the command line
echo %PROCESSOR_ARCHITECTURE%
check the PROCESSOR_ARCHITECTURE environment variable. 64-bit systems will say AMD64 and 32-bit systems should say "x86"
C:\>wmic OS get OSArchitecture
OSArchitecture
32-bit


To display the MD5 hash of a file, type the following command at a command prompt:
fciv.exe filename
fciv.exe -sha1 filename

  • AD Shortcuts
dsa.msc                                Active Directory Users and Computers
adsiedit.msc                    ADSI Edit
AdRmsAdmin.msc                Active Directory Rights Managment Services Administration
azman.msc                            Authorization Manager
certsrv.msc                        Active Directory Certificate Services
CluAdmin.msc                    Failover Cluster Manager
dfsmgmt.msc                        DFS Managment
dhcpmgmt.msc                    DHCP Management
dnsmgmt.msc                        DNS Management
domain.msc                        Active Directory Domains and Trusts
fsrm.msc                            File Server Resource Manager
gpmc.msc                            Group Policy Management Console
gpme.msc                            Group Policy Management Editor
lsdiag.msc                        Remote Desktop Licensing Diagnoser
remoteprograms.msc        RemoteApp Manager
rrasmgmt.msc                    Routing and Remote Access
sbmgr.msc                            Remote Desktop Connection Manager
tsadmin.msc                        Remove Desktop Services Manager
tsconfig.msc                    Remove Desktop Session Host Configuration
tsmmc.msc                            Remote Desktops
winsmgmt.msc                    WINS Management
WSRM.msc                            Windows System Resource Manager




  • Local Computer Shortcuts 
gpedit.msc                Local Group Policy Editor
fsmgmt.msc                Shared Folders
eventvwr.msc            Event viewer
certlm.msc                Certificates – Local Computer
certmgr.msc                Certificates – Local Users
certtmpl.msc            Certificates Templates Console
appwiz.cpl                Programs and Features
Firewall.cpl            Windows Firewall
compmgmt.msc            computer management
psr.exe                     steps recorder
comexp.msc                Component Services
devmgmt.msc                Device Manager
diskmgmt.msc            Disk Management
lusrmgr.msc                Local Users and Groups
ncpa.cpl                    Network Connections
perfmon.msc                Performance Monitor
sysdm.cpl                    System Properties
WF.msc                        Windows Firewall with Advanced Security



  • Windows Run Commands Shortcuts

Control Panel Program Shortcuts
control                                 Control Panel
control netconnections     Network Properties
control printers                 Printers Folders
control userpasswords2     Manager all User Accounts
control update                     Windows Update
control admintools             Administrative Tools
control schedtasks             Scheduled Tasks
appwiz.cpl                             Program and Features
intl.cpl                                 Regional Settings (International)
sysdm.cpl                             System Properties
firewall.cpl                         Windows Firewall

Windows Tools
explorer            Windows Explorer
regedit             Registry Editor
services.msc     Windows Services (local)
taskmgr             Task Manager
msconfig             System Configuration Utility
mstsc                 Remote Desktop (Microsoft Terminal Services)
logoff                 Log Off Windows (without confirmation!
shutdown             Shuts Down Windows (don't try unless you are ready to shutdown)
msinfo32             System Information


  •  Tools
_Network Tools
Network Monitor
Nagios Core
OpenNMS
Advanced IP Scanner
Messsage Analyzer
Capsa Free
Wireshark
Fiddler
NetworkMiner
Zenoss Core
Pandora FMS
Xirrus Wi-Fi Inspector
WirelessNetView
Xymon
NetXMS
Total Network Monitor
Icinga 2
Angry IP Scanner
Splunk
The Dude
PRTG Network Monitor Freeware


fciv gpg4win-2.2.5.exe -sha1
fciv gpg4win-2.2.5.exe -md5
fciv gpg4win-2.2.5.exe -sha1 > filedownloaded.txt
fciv gpg4win-2.2.5.exe -md5    > filedownloaded.txt



_System Tools
Shadow Explorer

_Security Tools
Malwarebytes Anti-Malware
Hitman Pro3

_Data Recovery Tools
Data Recovery Wizard Free 9.0
R-STUDIO
Recuva

storage administrator daily tasks

Note:
1. Storage = disk, tape, SAN, and storage software
2. Percentage after each task is approximatley timed



1. Manage current storage environment (20%)

    Resolve any storage shortages
    Alert and resolve any performance issues and notify end-users
    Insure that data is available to all applications

2. Application support (20%)

    Work with application developers to determine storage requirements
    Work with existing programmers, DBAs to optimize storage

3. Backup (15%)

    Maintain proper backup schedule
    Restore and recover data as requested
    Facilitate off-site storage of tape

4. Monitor current storage environment (15%)

    Usage
    Performance
    Availability
    Reporting on status


5. Capacity planning (10%)

    Forecast storage growth
    Determine allocation of different storage types

infrastructure engineer daily tasks


network monitoring tool (nagios, zabbix etc)
monitoring capturing log files
monitoring capturing servers cpu memory usage
monitoring capturing file system space
monitoring capturing network usage

automate with scripts routine users/sysadmin tasks
end user management/support 1/2/3 layer support
building knowledge base
documentary/sharing procedures
emergency phone list for support

ITIL product
ITSM,IT infrastructure, IT operations

backup software
tape backup management

disaster recovery plan
business continuity plan

RAID configuration,implementation
update management software, WSUS

antivirus software endpoints

adding new hardware
server room visits
check on aircon extractor fans blinking alarms
trailing cables
humidity controls


internet connectivity
domain controllers
cleanup logs, automation

webmin, apache,sendmail,mysql

remote access tools
vnc,dameware,webex,teamviewer

spam filter
mailbox sizes
db fragmentation