Wednesday, June 3, 2009

Java Jar files


jar cvf app.jar MyApp.class

execute jar files
java -jar app.jar

java -classpath app.jar foo.Main

Thursday, May 28, 2009

bouncycastle

Bouncycastle supported Encodings and Algorithm
http://www.bouncycastle.org/specifications.html

fedora last reboot, poweroff

who command
You need to use who command, to print who is logged on. It also displays the time of last system boot. Use last command to display system reboot and shutdown date and time.

$ who –b

Output:system boot Apr 30 15:08

Use last command to display listing of last logged in users and system last reboot time and date:

$ last reboot lessOr better try:$ last reboot head -1
Output:reboot system boot 2.6.15.4 Sun Apr 30 15:08 - 16:22 (01:13)

last command searches back through the file /var/log/wtmp and displays a list of all users logged in (and out) since that file was created. The pseudo user reboot logs in each time the system is rebooted. Thus last reboot command will show a log of all reboots since the log file was created.

To display last shutdown date and time use following command:

$ last -x grep down
$ last -xgrep shutdown head -1
Output:shutdown system down 2.6.15.4 Sun Apr 30 13:31 - 15:08 (01:37)

Where,


-x: Display the system shutdown entries and run level changes.

fedora logs

Fedora's /etc/syslog.conf follows a standard logic:

mail logs are stored in /var/log/maillog,
system's logs are in /var/log/messages,
cron jobs activities are in /var/log/cron,
authentication data are in /var/log/secure.

Sunday, April 26, 2009

Active directory remote administration

References: http://www.computerperformance.co.uk/w2k3/utilities/ldp.htm

Monday, April 20, 2009

Increase Glassfish memory(heap)

Application Server->JVM Settings->JVM Options

Change -Xmx512m to -Xmx1024m or more.

OR if you are get out of PermGen memory add a property

-XX:MaxPermSize=256m

Tuesday, April 14, 2009

glassfish remove http instance port xx80

Goto /opt/glassfish/domain/dsss/config
vi domain.xml

Change below

<http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="server" enabled="true" family="inet" id="http-listener-1" port="2080" security-enabled="false" server-name="" xpowered-by="true">
<property name="proxiedProtocols" value="ws/tcp"/>
</http-listener>

<http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="server" enabled="true" family="inet" id="http-listener-2" port="2081" security-enabled="true" server-name="" xpowered-by="true">
<ssl cert-nickname="s1as" client-auth-enabled="false" ssl2-enabled="false" ssl3-enabled="true" tls-enabled="true" tls-rollback-enabled="true"/>
</http-listener>

to:

<http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="server" enabled="true" family="inet" id="http-listener-1" port="2081" security-enabled="true" server-name="" xpowered-by="true">
<ssl cert-nickname="s1as" client-auth-enabled="false" ssl2-enabled="false" ssl3-enabled="true" tls-enabled="true" tls-rollback-enabled="true"/>
<property name="proxiedProtocols" value="ws/tcp"/>
</http-listener>



remove http-listener-2 from below:

<http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="__asadmin" enabled="true" family="inet" id="admin-listener" port="2048" security-enabled="false" server-name="" xpowered-by="true"/>
<virtual-server hosts="${com.sun.aas.hostName}" http-listeners="http-listener-1,http-listener-2" id="server" log-file="${com.sun.aas.instanceRoot}/logs/server.log" state="on">
<property name="docroot" value="${com.sun.aas.instanceRoot}/docroot"/>
<property name="accesslog" value="${com.sun.aas.instanceRoot}/logs/access"/>
<property name="sso-enabled" value="false"/>
</virtual-server>