- Open Windows command prompt in administrator mode.
- At the command prompt type: netsh winsock reset catalog and press [Enter].
- Next type: netsh int ip reset reset.log and press [Enter].
- Restart your PC for the changes to take effect.
Embedded software development and testing
Tuesday 13 December 2016
Netsh command to disable IPv4 Autoconfiguration in Windows 10/ Windows 8
Wednesday 18 May 2016
PERL example for opening EXCEL sheet using WIN32:OLE
#!/usr/bin/perl
# This PERL file will open one EXCEL, create 4 WORK Sheets, in first # WORKSheet make table with borders and few values
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Excel';
$Win32::OLE::Warn = 3; # die on errors...
my $Excelfile = Win32::OLE->GetActiveObject('Excel.Application')
|| Win32::OLE->new('Excel.Application', 'Quit');
$Excelfile->{DisplayAlerts} = 0;
$Excelfile->{ScreenUpdating} = 0;
$workbook = $Excelfile->Workbooks->Add();
for ($j=1;$j<=4;$j++)
{
$worksheet = $workbook->WorkSheets->Add({after => $workbook->WorkSheets($workbook->WorkSheets->{COUNT})});
$worksheet->{Name}="Summary_".$j;
}
my $cur_dir = `cd`;
chomp($cur_dir);
$TargetFile = $cur_dir."\\Excel_Test_File.xls";
print "Result file name is $TargetFile \n";
#Select first sheet and write values
$worksheet=$workbook->WorkSheets("Summary_1");
$current_row = 3;
$start_row_forborder=$current_row;
$current_col = 2;
#for ($k=0;$k<3;$k++)
#{
#
# $worksheet->Cells($current_row,$current_col)->Font->{FontStyle}="Bold";
# $worksheet->Cells($current_row,$current_col)->Interior->{ColorIndex} =24;
# $worksheet->Columns($current_col)->{ColumnWidth}=20;
# $current_col++;
#
#}
### Another way of formatting if we are using fixed columns
$worksheet->Range("B$current_row:D$current_row")->Font->{FontStyle}="Bold";
$worksheet->Range("B$current_row:D$current_row")->Interior->{ColorIndex} =24;
$worksheet ->Range("B$current_row:D$current_row") ->{ColumnWidth} = 20;
#$current_col=$current_col-3;
$worksheet->Cells($current_row, $current_col)->{'Value'} = "S.No";
$worksheet->Cells($current_row, $current_col+1)->{'Value'} = "Name";
$worksheet->Cells($current_row, $current_col+2)->{'Value'} = "Department";
$worksheet->Cells($current_row, $current_col+2)->{'Value'} = "Work_type";
$current_row++;
for ($i=1;$i<=10 ;$i++) {
$worksheet->Cells($current_row, $current_col)->{'Value'} =$i;
$worksheet->Cells($current_row, $current_col+1)->{'Value'} = "Name_".$i;
$worksheet->Cells($current_row, $current_col+2)->{'Value'} = "Colour";
$current_row++;
}
$last_row=$current_row-1;
#### Keep border for excel if it is last line.
$worksheet->Range("B$start_row_forborder:D$last_row")->{HorizontalAlignment} = xlHAlignRight;
$worksheet->Range("B$start_row_forborder:D$last_row")->{Borders}->{Weight} = xlThin;
#Deleting Default SHEETS
$worksheet = $workbook->Worksheets("Sheet1")->Delete();
$worksheet = $workbook->Worksheets("Sheet2")->Delete();
$worksheet = $workbook->Worksheets("Sheet3")->Delete();
$workbook->Worksheets(1)->Activate;
$workbook->SaveAs("$TargetFile");
$workbook->Close;
Monday 9 May 2016
Syntax error in /sysroot/etc/selinux/config : 6 : syntax error ";" unexpected failed to boot sleeping forever.
We got this issue in one of the Linux PC, by mistake in the config file of SELinux instead of using # for commenting ";" was used. After reboot the PC won't boot with below messages:
/sysroot/etc/selinux/config : 10 : syntex error: ";" unexpected
Signal caught!
Boot has failed, sleeping forever.
===============================
We can access GRUB command line but Single mode bootup doesnt work. the only way to recover was to use Live CD, go to rescue mode. Give below command in shell:
chroot /mnt/sysimage
cd etc/selinux
vim config
Modify the statement and save and reboot.
And it worked....
Keep Working , Keep Trying !!
Friday 22 April 2016
Windows "Netsh" command to change Interface Dynamic to Static IP address
netsh interface ip set address name="Local Area Connection" source=static 10.10.1.1 255.0.0.0
netsh interface ip set address name="Local Area Connection" source=dhcp
Monday 29 February 2016
Convert SNMP MIBs into Excel Spreadsheets for analysis -MIB Parser tool
==============================================
Parses multiple mibs into a single spreadsheet for analysis of mib variables and traps. Intended to be complimentary to Netcool/micromuse so one can analyze traps before creating rules.
Created by user : carmodyquinn
Parses multiple mibs into a single spreadsheet for analysis of mib variables and traps. Intended to be complimentary to Netcool/micromuse so one can analyze traps before creating rules.
Created by user : carmodyquinn
In this we wanted to add allowed value range of MIB variables also.
One of my colleague has added this functionality, with her permission , sharing with all. As i think it can be useful for others as well.
One of my colleague has added this functionality, with her permission , sharing with all. As i think it can be useful for others as well.
Its raw script and is not properly formatted , but does the task properly. If someone wants to inform the original creator/user and can ask him/her to add it in original version will be great.
https://drive.google.com/file/d/0BzbTV9YEt8Y0dmpSR1pVNlFfRlk/view?usp=sharing
"The satisfaction of making out the best with whatever is handed to you by GOD, is much more valuable then anything else."
https://drive.google.com/file/d/0BzbTV9YEt8Y0dmpSR1pVNlFfRlk/view?usp=sharing
"The satisfaction of making out the best with whatever is handed to you by GOD, is much more valuable then anything else."
Keep Trying, Keep Improving!
SNMP Online MIB Validation tool
Below given RFC governs the structural compliance of the SNMP MIB's
RFC : 2578
Structure of Management Information Version 2 (SMIv2)
http://tools.ietf.org/html/rfc2578
RFC :2579
Textual Conventions for SMIv2
http://tools.ietf.org/html/rfc2579
RFC :2580
Conformance Statements for SMIv2
http://tools.ietf.org/html/rfc2580
To validate if the SNMP MIB is compliant or not or till which level it is complaint, Simpleweb online MIB validation tool can be used.
http://www.simpleweb.org/ietf/mibs/validate/
http://www.simpleweb.org/ietf/mibs/validate/
Subscribe to:
Posts (Atom)