SET LLDP System NAME:
system name ALL-Uplink
system location SIAM-FL11
SHOW LLDP Configure:
show lldp config or show lldp local-system
ENABLE LLDP remote System:
lldp chassis tlv management port-description enable system-name enable system-description enable system-capabilities enable
lldp chassis tlv management management-address enable
lldp chassis tlv dot1 vlan-name enable port-vlan enable
lldp chassis tlv dot3 mac-phy enable
Thursday, November 2, 2017
Monday, October 16, 2017
Clear /BOOT Linux Ubuntu
Clear /BOOT Linux Ubuntu
1. uname -r @check Current Linux Kernal
2. dpkg --list 'linux-image*' @List All Linux kernel Images Store in /BOOT
- Manual delete
$sudo apt-get remove linux-image-VERSION @Manual delete Linux kernel Images
- Auto remove (recommend)
$sudo apt-get autoremove
- Update
$sudo apt-get update
- Run Grub Update
$sudo update-grub
1. uname -r @check Current Linux Kernal
2. dpkg --list 'linux-image*' @List All Linux kernel Images Store in /BOOT
- Manual delete
$sudo apt-get remove linux-image-VERSION @Manual delete Linux kernel Images
- Auto remove (recommend)
$sudo apt-get autoremove
- Update
$sudo apt-get update
- Run Grub Update
$sudo update-grub
Tuesday, September 5, 2017
Generate scrip using dbms_metadata.get_ddl in ORACLE
select dbms_metadata.get_ddl('OBJECT_TYPE','OBJECT_NAME','OWNER') a from dual
ex.
:TYPE TABLE
select dbms_metadata.get_ddl('TABLE','PMS_ACADEVALSTAFFWORKPUB','HRIS') a from dual
:TYPE CONRAINTS
SQL> set linesize 200
SQL> col c format a100
SQL>set long 9999
SQL> select dbms_metadata.get_ddl('CONSTRAINT', 'PK_APP_POSTAPPLICANTTOPIC','HRIS') c from dual;
C
--------------------------------------------------------------------------------
ALTER TABLE "HRIS"."APP_POSTAPPLICANTTOPIC" ADD CONSTRAINT "PK_APP_POSTAPPLICANTTOPIC" PRIMARY KEY ("ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ENABLE
ex.
:TYPE TABLE
select dbms_metadata.get_ddl('TABLE','PMS_ACADEVALSTAFFWORKPUB','HRIS') a from dual
:TYPE CONRAINTS
SQL> set linesize 200
SQL> col c format a100
SQL>set long 9999
SQL> select dbms_metadata.get_ddl('CONSTRAINT', 'PK_APP_POSTAPPLICANTTOPIC','HRIS') c from dual;
C
--------------------------------------------------------------------------------
ALTER TABLE "HRIS"."APP_POSTAPPLICANTTOPIC" ADD CONSTRAINT "PK_APP_POSTAPPLICANTTOPIC" PRIMARY KEY ("ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ENABLE
Saturday, July 29, 2017
7zip command
Download 7zip Command and copy file to C:\window\system32
FOR %i IN (*.*) DO 7za.exe a "%~ni.zip" "%i"
FOR %i IN (*.*) DO 7za.exe a "%~ni.zip" "%i"
Thursday, June 22, 2017
Find and Exec
mtime,ctime,atime
Option in Find Command ON Linux
mtime - modified content in files
ctime - mofified Permision, Group, Owner
atime - Time to access files
exp:
find /u03/rman-backup/ \ <----- path to finding
-name "*NIDAREG*" \ <------- find word in FileName
-mtime -1 \ <------- Modified Time ( in this case , time to Create file on last day (-1))
-exec scp -p {} admin@192.168.1.10:/STORAGE/rman-backup/NIDAREG \; <----- execute Command ( Copy file to another File Server via SCP command )
*scp option -p (preserve timestamp)
find ./*.gz \ <----- find *.gz
-mtime +7 \ <---- time over 7 day
-type f | \ <------ type File
xargs du -ksh <-----find Size of File
STAT Command
- show atime,ctime, mtime
exp:
stat filename
[admin@M4000-Storage temp]$ stat BACKUP_NIDAREG_20170622.out
File: ‘BACKUP_NIDAREG_20170622.out’
Size: 33134 Blocks: 72 IO Block: 4096 regular file
Device: 810h/2064d Inode: 112541699 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1001/ admin) Gid: ( 1001/ admin)
Context: unconfined_u:object_r:unlabeled_t:s0
Access: 2017-06-22 10:05:53.000000000 +0700
Modify: 2017-06-22 01:12:06.000000000 +0700
Change: 2017-06-22 10:15:57.289435709 +0700
Birth: -
ref: http://www.unix.com/tips-and-tutorials/20526-mtime-ctime-atime.html
Option in Find Command ON Linux
mtime - modified content in files
ctime - mofified Permision, Group, Owner
atime - Time to access files
exp:
find /u03/rman-backup/ \ <----- path to finding
-name "*NIDAREG*" \ <------- find word in FileName
-mtime -1 \ <------- Modified Time ( in this case , time to Create file on last day (-1))
-exec scp -p {} admin@192.168.1.10:/STORAGE/rman-backup/NIDAREG \; <----- execute Command ( Copy file to another File Server via SCP command )
*scp option -p (preserve timestamp)
find ./*.gz \ <----- find *.gz
-mtime +7 \ <---- time over 7 day
-type f | \ <------ type File
xargs du -ksh <-----find Size of File
STAT Command
- show atime,ctime, mtime
exp:
stat filename
[admin@M4000-Storage temp]$ stat BACKUP_NIDAREG_20170622.out
File: ‘BACKUP_NIDAREG_20170622.out’
Size: 33134 Blocks: 72 IO Block: 4096 regular file
Device: 810h/2064d Inode: 112541699 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1001/ admin) Gid: ( 1001/ admin)
Context: unconfined_u:object_r:unlabeled_t:s0
Access: 2017-06-22 10:05:53.000000000 +0700
Modify: 2017-06-22 01:12:06.000000000 +0700
Change: 2017-06-22 10:15:57.289435709 +0700
Birth: -
ref: http://www.unix.com/tips-and-tutorials/20526-mtime-ctime-atime.html
ADD SCSI Disk Oracle Linux
:find scsi controller
ls /sys/class/scsi_host/
host0 host1 host2
:scan scsi disk
echo "- - -" > /sys/class/scsi_host/host0/scan
echo "- - -" > /sys/class/scsi_host/host1/scan
echo "- - -" > /sys/class/scsi_host/host2/scan
ls /sys/class/scsi_host/
host0 host1 host2
:scan scsi disk
echo "- - -" > /sys/class/scsi_host/host0/scan
echo "- - -" > /sys/class/scsi_host/host1/scan
echo "- - -" > /sys/class/scsi_host/host2/scan
Monday, May 1, 2017
SNMP Alcatel Switch
! SNMP :
aaa authentication snmp "local"
snmp security no security
user snmpuser password password read-only all no auth
snmp community map "NIDA_QA" user "snmpuser" on
snmp station 10.100.100.150 161 "snmpuser" v1 enable
aaa authentication snmp "local"
snmp security no security
user snmpuser password password read-only all no auth
snmp community map "NIDA_QA" user "snmpuser" on
snmp station 10.100.100.150 161 "snmpuser" v1 enable
system location SIAM_FL11
Subscribe to:
Posts (Atom)
ALCATEL 6900
write memory copy running certified reload from working no rollback-timeout
-
SET LLDP System NAME: system name ALL-Uplink system location SIAM-FL11 SHOW LLDP Configure: show lldp config or show lldp local-syste...
-
grant execute on utl_http to wc grant execute on dbms_lock to wc; BEGIN DBMS_NETWORK_ACL_ADMIN.create_acl ( acl => ...
-
:system view system-view or sys :show all config dis current-configuration :create vlan vlan vlan_number :show ip interface ...