aix

aix下lvm常用操作-查看

孤街浪徒 提交于 2019-12-05 14:32:50
pv(physical volume):对应物理磁盘 vg(volume group):由1个或多个物理硬盘组成 lv(logical volume):在vg上创建相应的逻辑分区,可以动态地扩大,缩小。将其格式化,mount到一个目录就成了可以直接访问的文件系统。 #lspv //查看所有的物理卷(物理磁盘) #lsvg //查看所有的卷组(物理磁盘组成) #lsvg -o //查看挂载成功的卷组 #lsvg -p glvg //查看glvg卷组包含哪些物理卷 #lsvg -l glvg //查看glvg卷组包含哪些逻辑卷 #lspv -l hdisk1 //查看hdisk1物理磁盘包含哪些逻辑卷 #lsvg rootvg //查看rootvg的详细信息 #lspv hdisk0 //查看hdisk0物理卷的详细信息 #lslv oralv2 //查看oralv2逻辑卷的详细信息 来源: https://www.cnblogs.com/zhxiaoxiao/p/11928175.html

Perl Program to efficiently process 500,000 small files in a directory

两盒软妹~` 提交于 2019-12-05 13:14:34
I am processing a large directory every night. It accumulates around 1 million files each night, half of which are .txt files that I need to move to a different directory according to their contents. Each .txt file is pipe-delimited and contains only 20 records. Record 6 is the one that contains the information I need to determine which directory to move the file to. Example Record: A|CHNL_ID|4 In this case the file would be moved to /out/4 . This script is processing at a rate of 80,000 files per hour. Are there any recommendations on how I could speed this up? opendir(DIR, $dir) or die "$!\n

GIT not tracking files

拟墨画扇 提交于 2019-12-05 11:02:38
I have setup GIT on AIX 6.1 and am facing problems. The sequence of steps I followed are as shown: I create a folder. Go into the folder and initialise the non-bare repository Initialise the username and user email Create a file named index.html with some data in the file. Create a subfolder named newfolder Go into the newly created folder. Create a new file named index-2.html with some data in it. After performing all the steps above and give the git status command I'm getting the foll result: # On branch master # # Initial commit # # Untracked files: # (use "git add <file>..." to include in

AIX—日常运维命令总结

只愿长相守 提交于 2019-12-05 01:58:22
1、 查看AIX服务器的物理构造信息,包括服务器网络配置信息 # prtconf # ifconfig -a # lsattr -E -l mem0 :查看系统内存大小 # netstat -in :显示系统各网卡的配置信息 2、 开启和关闭AIX服务器 # shutdown -F :快速关机 # shutdown -I :采用交互式模式关闭系统 # shutdown -K :避免关闭系统 # shutdown -m :关闭AIX系统服务后,安装维护模式运行 # shutdown -r :关闭服务器后,并立刻重新启动 3、 设置网络IP # smit tcpip 4、 查看系统中的设备信息(板卡,适配器,磁盘,磁带机,光驱,网卡,处理器等信息) # lscfg 5、 查看某个设备信息,如查看磁盘信息 # lscfg -l hdisk0 6、 查看AIX主机型号 # uname -M 7、 查看产品部件号,序列号和设计更改级别等信息,可以使用 –v 选项 # lscfg -v | more 8、 查看设备信息同时显示标题行 # lsdev -P -H 9、 查看网卡信息 # lsdev -Cc adapter # lsdev -Cc adapter | grep ent 查看CPU个数: # smtctl 10、查看磁带机的设备属性等信息 # lsattr -l tmt0 -D 11

AIX运维常用命令

感情迁移 提交于 2019-12-05 01:55:25
目前传统的磁盘管理仍有不足:如果下Unix系统中的存储容量需要扩展,文件系统就必须停止运行,然后通过重构分区的手段来进行分区和文件系统的扩容。一般采用的方法是先备份该文件系统并删除其所在的分区,然后重构更大的分区,在重构文件系统,最后将数据装在回来。 AIX概念类:IBM的Unix系统,采用LVM逻辑卷管理器,实现了磁盘分区(文件系统必须建立在磁盘分区上才能使用)的动态扩容。 1.lsdev 查看AIX中的硬件设备信息 在AIX中,系统设备信息都存储在一个被称为ODM(工程数据管理)数据库的数据结构中,负责管理和存放系统信息,以及设备的配置信息。ODM数据库包含两大部分:Predefined库(预定义库)和Customized库(用户定制库) P库:预定义对象库包含了AIX所有支持的设备对象 C库:用户定制库则包含了系统中实际存在的设备 lsdev -P 查看P库 lsdev -C 查看C库 lsdev -C -c disk 查看硬盘信息 (-c表示要查看哪一类的设备) lsdev -C -H 查看C库,并显示的信息带有标题行 exp:生产系统使用AIX自带的硬盘和主存储磁盘阵列时候,可以用lsdev -C -c disk命令查看 # lsdev -C -c disk 查看大C库(系统实际有的设备)中硬盘类的信息 hdisk0 Available 00-08-00 SAS Disk

AIX系统逻辑卷管理

可紊 提交于 2019-12-05 01:54:50
前言: 前期项目需要部署多套AIX环境下RAC集群,之前很少接触AIX系统,上来被创建逻辑卷等基本命令打脸了,其实网上搜下资料很多,总结一下,也是方便自己日后查阅。 创建逻辑卷 1.查看所有磁盘设备 # lsdev -Cc disk hdisk0 Available 50-T1-01 Huawei XSG1 FC Disk Drive hdisk1 Available 50-T1-01 Huawei XSG1 FC Disk Drive hdisk2 Available 50-T1-01 Huawei XSG1 FC Disk Drive hdisk3 Available 50-T1-01 Huawei XSG1 FC Disk Drive hdisk4 Available 50-T1-01 Huawei XSG1 FC Disk Drive hdisk5 Available 50-T1-01 Huawei XSG1 FC Disk Drive hdisk6 Available 50-T1-01 Huawei XSG1 FC Disk Drive hdisk7 Available 50-T1-01 Huawei XSG1 FC Disk Drive hdisk8 Available 50-T1-01 Huawei XSG1 FC Disk Drive hdisk9

SWIG crashes on AIX (with python, and probably everything else SWIG support)

此生再无相见时 提交于 2019-12-04 17:38:15
SWIG compiles and install easily on AIX. Unfortunately, a simple SWIG hello world (which also compiles - but not so easily) crashes with Segmentation Fault or Illegal Instruction (depending on some details of the compilation/linker process). This happens with both gcc and xlc (IBM c compiler). I tried only the native AIX linker ld, because the homonyms GNU ld was not installed on my system. File: example.c #include <time.h> double My_variable = 3.0; int fact(int n) { if (n <= 1) return 1; else return n*fact(n-1); } int my_mod(int x, int y) { return (x%y); } char *get_time() { time_t ltime;

解决svn在AIX5.3上中文显示成乱码的问题

三世轮回 提交于 2019-12-04 15:41:42
前段时间在AIX5.3上成功安装了svn1.6.3,在svn commit时录入中文信息后,在aix上查看(svn log)时显示正常,但是在windows上查看日志时显示的是乱码。另外在windows上提交中文名的文件或者下载中文名的文件到AIX上时,文件名显示的是乱码。 摸索很久发现svn不同平台间传输用的编码都是UTF8,各个平台展现时用的各自的编码,由于不一致导致展现的是乱码。在AIX上用local可以看到: LANG=english_us.8859 LC_COLLATE="C" LC_CTYPE="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_MESSAGES="C" LC_ALL= 为正确显示中文信息,需要修改环境变量LC_TYPE=zh_CN,但是直接修改这个环境变量可能会影响其他程序,因此设置成alias svn='env LC_CTYPE=zh_CN svn'让它只对svn命令生效。 来源: oschina 链接: https://my.oschina.net/u/20954/blog/1261

How to provide extend-on-write functionality for memory mapped files in Linux?

本小妞迷上赌 提交于 2019-12-04 13:01:43
问题 I'm working on porting some code from AIX to Linux. Parts of the code use the shmat() system call to create new files. When used with SHM_MAP in a writable mode, one can extend the file beyond its original length (of zero, in my case): When a file is mapped onto a segment, the file is referenced by accessing the segment. The memory paging system automatically takes care of the physical I/O. References beyond the end of the file cause the file to be extended in page-sized increments. The file

What is the unix command to see how much disk space there is and how much is remaining?

那年仲夏 提交于 2019-12-04 10:02:55
问题 I'm looking for the equivalent of right clicking on the drive in windows and seeing the disk space used and remaining info. 回答1: Look for the commands du (disk usage) and df (disk free) 回答2: Use the df command: df -h 回答3: df -g . Option g for Size in GBs Block and . for current working directory. 回答4: I love doing du -sh * | sort -nr | less to sort by the largest files first 回答5: If you want to see how much space each folder ocuppes: du -sh * s – summarize h – human readable * – list of