Skip to main content

Posts

Showing posts from March, 2024

Đọc source code xem systemd chạy chương trình mở được tối đa bao nhiêu file?

Mặc định chương trình trên Linux chỉ mở được giới hạn file nhất định. Nếu chạy từ shell (như bash) giá trị này thường có thể xem từ lệnh $ ulimit -n 1024 giá trị này có thể thay đổi ngay trên shell $ ulimit -n 9999 $ ulimit -n 9999 Set process max open files trên Systemd Khi chạy bằng systemd, các service sẽ kết thừa giá trị limit của systemd hoặc tự set bằng LimitNOFILE $ systemd --version systemd 249 (249.11-0ubuntu3.12) Theo man 2 setrlimit A child process created via fork(2) inherits its parent's resource limits. Resource limits are preserved across execve(2). Xem giá trị theo 2 cách: dùng lệnh systemctl show và xem trên /proc filesystem % systemctl show cron| grep NOFILE LimitNOFILE=524288 LimitNOFILESoft=1024 % systemctl status cron | grep PID Main PID: 464 (cron) % cat /proc/464/limits Limit Soft Limit Hard Limit Units Max cpu time unlimited unlimited seconds Max file ...

View Japanese on OpenBSD 7.4 Firefox with unifont

By default, you cannot view Chinese/Japanese/Korean (CJK) on OpenBSD, it shows only square box. It needs CJK fonts to be installed. unifont is one supports many languages by GNU. $ pkg_info unifont Information for inst:unifont-15.0.06 Comment: free Unicode font from the GNU project Description: GNU Unifont is a font that contains glyphs for every printable code point in the Unicode Basic Multilingual Plane (BMP). There is also growing coverage of the Supplementary Multilingual Plane (SMP), and of Michael Everson's ConScript Unicode Registry (CSUR). Maintainer: Brian Callahan <bcallah@openbsd.org> WWW: https://unifoundry.com/unifont/ $ pkg_info -L unifont Information for inst:unifont-15.0.06 Files: /usr/local/share/fonts/unifont/unifont.otf /usr/local/share/fonts/unifont/unifont.ttf /usr/local/share/fonts/unifont/unifont_csur.otf /usr/local/share/fonts/unifont/unifont_csur.ttf /usr/local/share/fonts/unifont/unifont_jp.otf /usr/local/share/fonts/unifont/unifont_jp.tt...

Popular posts from this blog

Tài liệu và hướng dẫn học Python

Để tiết kiệm thời gian, tốt nhất là đi học PyMI Updated: 130617 Sau đây là các tài liệu khuyên dùng: Vì nhiều lý do, nên học python2.7 tại thời điểm hiện tại (giờ là tháng 6/2013 - muốn biết tại sao thì tự tìm hiểu) python 3.5+ (giờ là tháng 2/2017) Chuẩn bị: 1. biết bật tắt máy 2. biết cài python 3. tập gõ 10 ngón - gõ 2 ngón hay 1 ngón cũng không sao, nhưng 10 ngón là cách dễ nhất để gõ nhanh nhất. Tài liệu - Nên dùng tài liệu tại trang chủ của Python làm chính, tham khảo thêm các tài liệu khác tại http://www.familug.org/2016/12/free-ebook.html Căn bản, mới học 1.1 Python PyMI.vn https://pymi.vn/tutorial/ 1.2. Python offical tutorial kết hợp làm bài tập trên HackerRank  (đề bài bằng tiếng Anh, nhưng Google translate 1 lúc cũng ra vì có nhiều ví dụ mẫu đi kèm). Học viên của Pymi.vn có rất nhiều học viên đã tự học với Learn Python the hard way nhưng chưa thấy ai thành công cả. Hai link dưới nên đọc sau khi đã nắm được những phần cơ bản của ngôn ngữ pytho...

The PyMiers

New FAMILUG