วันศุกร์, เมษายน 13, 2550

ว่าด้วยเรื่อง Samba บน OpenSolaris or Solaris 10

นึกอยากจะใช้ ๏แซมบ้า๛ บนเครื่อง๏โอเพ่นโซลาริส๛ เลยลองจัดการดูจนเวิร์ค
สรุปสั้นๆ ดังนี้
  • Solaris 10 and opensolaris already include Samba. No need to get it from sunfreeware.
  • The init process has been changed from Solaris 9 and previous versions. Sun introduced SMF (Service Management Facility) which is believed that, once mastered, it'll be better than the old one. I havn't mastered that so I can't tell anything about it.
  • Samba's binaries are in /usr/sfw/bin
  • Samba's config is in /etc/sfw/smb.conf
  • What you need is create smbpasswd for user(s) and edit smb.conf for your needs.
  • Use inetconv -i /etc/inet/inetd.conf to convert the inetd configuation to SMF service manifest, and import them to smf repository
Other related commands:
  • svcs -vx can be used to check the status of a service
  • svcconfig import .xml : to import a manifest for a service
  • svcadm enable : to enable a service
Memo:
- You can view installed files of a package by : less /var/sadm/pkg/SMCsamba/.......

วันพุธ, เมษายน 04, 2550

ว่าด้วยเรื่องการจัดการเมมโมรี่ใน Real-time Java (real-time java memory management: assimilated)

keyword: real-time java, memory management, memory area, immortal memory, scoped memory, heap.

ถาม ทำไมใน RTSJ ถึงได้กำหนด API สำหรับจัดการเม็ม ?
ตอบ เพราะไม่อยากให้เกิดการขัดจังหวะโดยGCในขณะที่รัน time-critical thread. ถึงแม้เราจะให้ตัว time-critical thread นี้มีpriorityสูงกว่าthreadอื่นๆ มันก็อาจจะถูกหน่วงไม่ให้รันได้อยู่ดี ลองพิจารณา low priority thread รันแล้วใช้ฮีปหมด GCเข้ามาเก็บกวาด ครึ่งๆกลางๆ แล้วเจ้า time-critical thread ซึ่งอาจจะเป็นperiodicก็ถึงเวลารัน ถ้ามันรันในขณะที่ GC ยังเก็บกวาดไม่เสร็จ ก็อาจจะทำให้มันเข้าไปอ้างถึงเม็มที่ยังเละเทะอยู่ (ชัดๆว่าเป็นพฤติกรรมที่ไม่เป็นน่าปรารถนา) ทันจึงถูกหน่วงให้รอ.

ด้วยเหตุฉะนี้ RTSJ จึงได้กำหนดให้มี memory area ซึ่งไม่ใช่ heap ได้แก่ immortal กับ scoped มา เพื่อให้แอพพลิเคชั่นไม่ถูกGC เข้ามารบกวน

วันจันทร์, เมษายน 02, 2550

Disable system beep

อ้างอิงจาก mailing list จำไม่ได้ว่าที่ไหน
1) สำหรับ X Window
$ xset b off
# better put this in ~/.xsession


2) สำหรับ Console
$ setterm -blength
หรือ
$ setterm -blength 0
# better put this in ~/.bash_profile or maybe .bashrc