Showing posts with label solaris. Show all posts
Showing posts with label solaris. Show all posts

Sunday, April 4, 2010

What to do when you don't have locate tool

What to do when you want to find certain file(s) and you don't have the locate tool? Probably you are in Solaris, AIX, or other variants of UNIX that doesn't have the locate tool. Probably your Linux sysadmin just don't like the locate tool to be there?
May be you are in the support team and now that there is no fancy locate tool you still need to find where the file is located.

Someone at the mailing list asked about the question, so I will write it here so that everybody can benefit from it.

What we can do depends on the frequency of locating such files. If we are to mimic the slocate / mlocate (ubuntu) background process, this what I would suggest (assuming you have /root folder and have root equivalent access):

[sourcecode lang="shell"]<br /># find / -print &gt; /root/locations.txt &amp;<br />[1] 30851<br />[/sourcecode]



The number "30851" is the process number for the background process. You need to wait for a while until the background process completed. When it completes, it should display something like:

[sourcecode lang="shell"]<br />[1] Done        find / - print &gt; /root/locations.txt<br />[/sourcecode]


Whenever you want to search file name containing "tomcat-6.0", just run this command:

[sourcecode lang="shell"]<br /># grep "tomcat-6.0" /root/locations.txt<br />/home/dbaktiar/Downloads/apache-tomcat-6.0.24.zip<br />/home/dbaktiar/Downloads/apache-tomcat-6.0.26.tar.gz<br />[/sourcecode]


If you are using Ubuntu or sudo based tools, we can modify:

[sourcecode lang="shell"]<br /># sudo find / -print &gt; /root/locations.txt &amp;<br />[1] 30851<br />[/sourcecode]



Wait until the background process complete (you can do something else if the task take quite long).
Then to find files with "tomcat-6.0" string in its filename:

 

[sourcecode lang="shell"]<br /># sudo grep "tomcat" /root/locations.txt<br />[/sourcecode]


If you want to locate certain file(s) once you can run this (as suggested by Mr Budi Rahardjo):

[sourcecode lang="shell"]<br /># find . -name &lt;pattern&gt; -print<br />[/sourcecode]


Replace <pattern> with the full name or partial name of the file. When wespecify the name of the file, we can use wildcards, but don't forget to quote the name when needed.

Tuesday, July 15, 2008

Sun Developers Day 2008 at Singapore


Today I attended the Sun Developers' Day. My office is not in the habit of sending people to such events, so I have to be a proactive person, take a one day leave to attend this event.
"Sun Developer Day 2008 brings together visionaries, leading experts and developers to seize the next wave of technical innovation through Open Source".

Trends that were presented are in the topics of JavaFX, MySQL, OpenSolaris.

This is my first time attending Sun Developers' Day. There were Sun Developers' Day events in Jakarta, but I didn't manage to have time to attend one of them. 

Some thing that interest me are: JavaFX, VirtualBox, new OpenSolaris eye candy, MySQL tuning, and Solaris DTrace, JDK 6 update 10, Grails.


Matt Thompson, manager of the Sun Technology Evangelist group,  gave an opening message. 

Among the speakers were:

Chuk-Munn Lee, Senior Developer Consultant and Technology Evangelist for Technology Outreach at Sun Microsystems in Singapore.

Joey Shen (Zhuo-Li, Chinese), Technology Evangelist for Sun Microsystems based in Beijing, China.

Peter Karlsson, Solaris Technology Evangelist for Sun Microsystems. 

Raghavan Srinivas, CTO of Technology Evangelism at Sun Microsystems.


This even also intertwinned with JavaJive competition final between universities from Singapore, Malaysia, and Thailand. Previously local competitions have been held in their respective countries. The final presentation brought was won by team from Thailand.



Sunday, August 19, 2007

IBM become Solaris reseller for its x86 product!

IBM has offered Windows based solution, then Linux solution, Novell solution, and now it also offers Solaris solution. This is of course marked the true separation of Sun's hardware business and its Solaris operating system business (now earns mostly from support!), a path that Sun has chosen years ago. Jon Schwartz has stated in his blog that August 16th, 2007 was the milestone for the separation.
Actually Solaris has run on high end hardware other than Sun's, but still in the SPARC architecture circle (such as Fujitsu high end servers).
Now Solaris runs a business model pretty much similar to the RedHat Enterprise Linux (RHEL), competing head-to-head to it, and has the advantage of being positioned as high end operating system lowering down to earth, while RHEL was positioned (at least by community) as hacker operating system trying to go up to become high end platform.
As far as I can remember, Sun also run its StarOffice business under the same business model. So I think this business model is nothing new to Sun.
It will be most likely that other x86 based hardware major vendors (HP/Compaq, Dell, Fujitsu, etc) will join the bandwagon, but IBM has had the advantage of being one to catch the first wave. Now users will have other choice instead of using Windows, Linux, and Novell.

Wednesday, May 23, 2007

XServer Configuration in MiNevada Fixed!


Lintang and Adhari from Open Solaris User Group Indonesia (OSUG-ID) has answered my question in the Open Solaris User Group. The answer is referring to previous post sometimes ago by Adhari (thanks to Lintang for the pointer and thanks to Adhari for the resourceful answer). I posted the answer here just in case the Google Groups link is available no more.

Mungkin ada yang mengalami problem yang sama ketika configure Xserver di VMWare. Sedikit berbagi trick ketika configure XServer pakai Xsun provider Solaris 10 di atas VMWare. Beberapa hari coba-coba install Solaris 10 di VMWare, inginnya mau start XServer dengan resolusi 1024x768. Problem muncul, konfigurasi sudah benar pakai 1024x768 tapi output selalu produce resolusi 800x600.
Step konfigurasi:
1. Jalankan kdmconfig di single user mode (init level 1)
2. Pilih Xsun
3. Pilih Change Video Device/Monitor
4. Pilih XF86-VMWARE VMWare Inc vmware0405
5. Pilih MultiFreq 56khz (up to 1280x1024 interlaced)
6. Pilih 17"
7. Pilih 1024x768 - 16M colors
8. Continue dan test
9. Jika tampil dengan benar pilih Yes
10. Kembali ke Init Level 3

No worry if you don't understand Bahasa, I'll translate it for you.
May be there are people who experience the same problem when configuring the Xserver on VMWare. I want to share a little trick to configure the XServer using Sun Solaris 10 Xsun provider on VMWare. After days of trial and errors installing Solaris 10 in VMWare, I just wanted to start XServer using the 1024x768 resolution. The problem occurs, though the configuration is for 1024x768 but the output always produces the 800x600 resolution.
This is my configuration step by step:
1. Run kdmconfig in single user mode (init level 1)
2. Choose Xsun
3. Choose Change Video Device/Monitor
4. Choose XF86-VMWARE VMWare Inc vmware0405
5. Choose MultiFreq 56khz (up to 1280x1024 interlaced)
6. Choose 17"
7. Choose 1024x768 - 16M colors
8. Continue and test
9. If it shows correctly then choose Yes
10. Back to Init Level 3

The article itself does not directly answer my question, because I don't know whether the vmware solution applies to me which uses different vm (that is Microsoft Virtual PC). But I believe this article is a highly resourceful one, because it gives me idea on what to try.

So, this is what I actually did:
Crawling through the broken graphics, try to locate and click the [Command line login].

Change to single user mode:
# init 1

Try to run the kdmconfig
# kdmconfig

Not working, because the term is not recognized. I eventually managed to find a working terminal type (remember those good ol' they when ANSI terminals are luxurious stuffs).

# export TERM=ansi
# kdmconfig

Choose Xsun, continue.
Change Video device/Monitor, continue.
Notebook LCD XGA 48kHz (1024x768 @60Hz), continue.
15-inch, continue.
1024x768 - 256 colors @60 MHz, continue.
No changes needed - Test/Save and Exit, continue.
Test.
If you can see the display, click the [OK] button.
Voila, it works!!!

Back to init level 3.

# init 3

Yipeeee!

Thursday, May 17, 2007

Nevada and then XmlBeans

This early morning, I managed to boot my MiNevada Solaris. It says something that recommends you to boot using Solaris failsafe, because it seems that it wasn't restarted gracefully.
Actually there's some terms I need to find out, because Solaris has different terms for disk stuffs some of them are cylinder groups/CG and slices.

Currently it is a high time for our (our and our clients') project, because we are somewhere half way to the completion of the SIT (System Integration Test). There are some problems that dragged our schedule, especially the slow and unstable network connection. Some of the SMSC (Short Messaging System Center) was also reported to fail on bindings/connection. The problems seemed to be irreproducible easily, because there were no changes on the binaries we deployed. It has been working before, now it doesn't work.

Last week I offered myself to present this topic: Apache Xmlbeans for the next Java Meeting Up (JaMU) on June 2007. I will not be able to attend this month's JaMU as I will be here in Cyberjaya until beginning of next month. I was lucky to experience it since I was assigned for the Galaxy customer care application until my latest project. Both WebLogic Platforms (8.1 and 9.2) heavily use the Apache Xmlbeans framework. I think the hardest think to learn at first is the XSD file. For me the XSD structure is obscure. I am not getting used to XML parsing other than using the Apache Commons Digester library. That's the way Struts digest the struts-config.xml file, and I think that was more than enough.
But since I am exposed to a project that heavily uses web services, I need a more sophisticated framework to map XML to Bean and vice versa. That was the time when I found this XML Bean mapping framework. The nice thing about it is that it offers the full functionality of XML while it is easily usable using ordinary Java Bean accessor methods.

Wednesday, March 28, 2007

Installing Solaris 10 on SunFire V210

Because most of my time, I have spent in the development, this event is considered a rare occasion: a hands-on experience on plain Sun SPARC based 64-bit machine. This time I have it all in my power: SunFire V210. A machine which you could install, reinstall, configure, reconfigure the way you want it.
In my opinion, it was much easier to install Solaris 10 on Sun's machine, than it was to install one on a virtual machine, or even on an ordinary PCs. The Auto Layout Disk went smoothly, no failure is necessary.
This is actually a rather old machine, used to test the installation script. The client doesn't want to go to their client and install the application only to find out that there's something missing in the installation script. So we fetch out a machine similar to the production platform: a SunFire V245. It is of a bigger size (2U, I think) compared to V210 (1U).

Powered by ScribeFire.



Monday, January 8, 2007

Solaris 10 Installation

Today I tried to install Solaris 10 for x86. So far the installer has done an excellent job. The installation is more or less like installing an NT 4.0 box. I've got not much problems encountered.

The installer bundles the JDK 1.5.0_06 inside.