Ubuntu 12.04 Eclipse SWT lib

by GarciaPL on Wednesday 24 October 2012


I have recently installed Eclipse using Ubuntu Software Center in Ubuntu 12.04 and when I run it I have below message in log :

java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
no swt-gtk-3740 in java.library.path
no swt-gtk in java.library.pathCan't load library: /home/tom/.swt/lib/linux/x86_64/libswt-gtk-3740.so
Can't load library: /home/tom/.swt/lib/linux/x86_64/libswt-gtk.so

at org.eclipse.swt.internal.Library.loadLibrary(Library.java:285)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:132)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:695)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:153)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:95)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

So, fix of this problem is one of those lines which you should run in terminal :

For Ubuntu 12.04 32 bit :

ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86/

For Ubuntu 12.04 64-bit:

ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/


Reference :
[1] Stackoverflow.com Eclipse cannot load SWT

Chrome deletes downloaded files

by GarciaPL on Saturday 20 October 2012


Recently I have problem with Google Chrome from version 22.0.1229.94 in one moment, when I am downloading some file. After complete the download, Chrome immediately delete the file.

There are two possibilities to solve the problem :
1. Roll back Chrome to previous version
2. Remove from Windows (of course if you are using it) one of those updates (I do not know which one ;)) :

Cumulative Security Update for Internet Explorer 8 for Windows 7 for x64-based systems
KB 2744842

All labelled "Security Update for WIndows 7 for x64-based Systems"
KB 2705219
KB 2724197
KB 2731847
KB 274355


Reference :
[1] Google Product Forums

Nagios HP BladeSystem Ambient Temperature

by GarciaPL


I uploaded to my github (link in reference) a script which allow you to check average ambient temperature for all Bays stored in HP BladeSystem using it's Onboard Administrator from which I put below sample output.


VM-CPX-CPD-1> show server temp all

Device Bay #1 Temperature Information
Locale                              Status      Temp    Caution   Critical
----------------------------------- ------    --------  -------   --------
Ambient Zone     (Inlet Ambient   ) OK        18C/ 64F    42C       46C
System Zone      (System Board    ) OK        23C/ 73F    85C       90C
CPU Zone         (CPU 1           ) OK         7C/ 44F    75C       80C
CPU Zone         (CPU 2           ) OK        19C/ 66F    75C       80C
CPU Zone         (CPU 3           ) OK          N/A
CPU Zone         (CPU 4           ) OK          N/A
Memory Zone      (DIMMs 1         ) OK        30C/ 86F    87C       92C
Memory Zone      (DIMMs 2         ) OK        29C/ 84F    87C       92C
Memory Zone      (DIMMs 3         ) OK          N/A
Memory Zone      (DIMMs 4         ) OK          N/A
Memory Zone      (Mem 1 1-4 Zone  ) OK        34C/ 93F    85C       90C
Memory Zone      (Mem 1 5-8 Zone  ) OK        35C/ 95F    85C       90C
Memory Zone      (Mem 2 1-4 Zone  ) OK        30C/ 86F    85C       90C
Memory Zone      (Mem 2 5-8 Zone  ) OK        34C/ 93F    85C       90C
Memory Zone      (Mem 3 1-4 Zone  ) OK        23C/ 73F    85C       90C
Memory Zone      (Mem 3 5-8 Zone  ) OK        23C/ 73F    85C       90C
Memory Zone      (Mem 4 1-4 Zone  ) OK        22C/ 71F    85C       90C
Memory Zone      (Mem 4 5-8 Zone  ) OK        24C/ 75F    85C       90C
I/O Board Zone   (IOH 1           ) OK        64C/147F   100C      105C
I/O Board Zone   (IOH 2           ) OK        62C/143F   100C      105C
I/O Board Zone   (NIC Zone        ) OK        67C/152F    90C       95C
I/O Board Zone   (Mezz Zone       ) OK        60C/140F    90C       95C
System Zone      (Chassis Exit    ) OK        64C/147F   100C      105C
Storage Zone     (HDD Max         ) OK        35C/ 95F    60C       65C

Virtual Fan: 28%

Device Bay #2 Temperature Information
Locale                              Status      Temp    Caution   Critical
----------------------------------- ------    --------  -------   --------
Ambient Zone     (Inlet Ambient   ) OK        17C/ 62F    42C       46C
System Zone      (System Board    ) OK        23C/ 73F    85C       90C
CPU Zone         (CPU 1           ) OK         6C/ 42F    75C       80C
CPU Zone         (CPU 2           ) OK         5C/ 41F    75C       80C
CPU Zone         (CPU 3           ) OK          N/A
CPU Zone         (CPU 4           ) OK          N/A
Memory Zone      (DIMMs 1         ) OK        30C/ 86F    87C       92C
Memory Zone      (DIMMs 2         ) OK        27C/ 80F    87C       92C
Memory Zone      (DIMMs 3         ) OK          N/A
Memory Zone      (DIMMs 4         ) OK          N/A
Memory Zone      (Mem 1 1-4 Zone  ) OK        33C/ 91F    85C       90C
Memory Zone      (Mem 1 5-8 Zone  ) OK        35C/ 95F    85C       90C
Memory Zone      (Mem 2 1-4 Zone  ) OK        28C/ 82F    85C       90C
Memory Zone      (Mem 2 5-8 Zone  ) OK        32C/ 89F    85C       90C
Memory Zone      (Mem 3 1-4 Zone  ) OK        23C/ 73F    85C       90C
Memory Zone      (Mem 3 5-8 Zone  ) OK        23C/ 73F    85C       90C
Memory Zone      (Mem 4 1-4 Zone  ) OK        22C/ 71F    85C       90C
Memory Zone      (Mem 4 5-8 Zone  ) OK        22C/ 71F    85C       90C
I/O Board Zone   (IOH 1           ) OK        58C/136F   100C      105C
I/O Board Zone   (IOH 2           ) OK        44C/111F   100C      105C
I/O Board Zone   (NIC Zone        ) OK        62C/143F    90C       95C
I/O Board Zone   (Mezz Zone       ) OK        57C/134F    90C       95C
System Zone      (Chassis Exit    ) OK        63C/145F   100C      105C
Storage Zone     (HDD Max         ) OK        35C/ 95F    60C       65C

Virtual Fan: 27%

Parameters :


-H
print help message

-c CRITICAL
critical level for average temperature

-w WARNING
warning level for average temperature

-U USERNAME
username to HP Onboard Administrator

-P PASSWORD
password to HP Onboard Administrator

-m TEMPERATURE
minimum temperature 

-x TEMPERATURE
maximum temperature


Example usage :

./NagiosHPBladeSystemTemperature.php -U <userName> -P <Password> -c <criticalLevel> -w <warningLevel> -m <minTemperature> -x <maxTemperature>