10
22
2014
27

获取日志区访问所占总访问量的百分比

获取文件系统负载工具如postmark,filebench等对文件系统日志区的访问所占访问的百分比。
 
准备工作:格式化测试盘,并将格式化的盘挂载
mkfs -t ext4 /dev/sdd1
mount /dev/sdd1 /home/tss/test-disk
 
 
step1:查看要测试磁盘中日志区的范围
查看/dev/sdd1磁盘中日志区的范围
在ext4中日志区由inode号8来指示,通过debugfs查看inode 8 所向的对应区域
 
debugfs /dev/sdd1
stat <8>
Inode: 8   Type: regular    Mode:  0600   Flags: 0x80000
Generation: 0    Version: 0x00000000:00000000
User:     0   Group:     0   Size: 134217728
File ACL: 0    Directory ACL: 0
Links: 1   Blockcount: 262144
Fragment:  Address: 0    Number: 0    Size: 0
ctime: 0x54477848:00000000 -- Wed Oct 22 17:26:32 2014
atime: 0x54477848:00000000 -- Wed Oct 22 17:26:32 2014
mtime: 0x54477848:00000000 -- Wed Oct 22 17:26:32 2014
crtime: 0x54477848:00000000 -- Wed Oct 22 17:26:32 2014
Size of extra inode fields: 28
EXTENTS:
(0-32766):15761408-15794174, (32767):15794175
 
上述红色部分表示的是日志结点所对应的磁盘块号。
 
 
step2:运行postmark脚本并用blktrace检测结果
2.1在/home/tss/test-disk中运行如下postmark的脚本
root@f304-PowerEdge-R710:/home/tss/test-disk# postmark postmark.cfg
其中postmark.cfg的脚本内容如下 
set size 1000 5000
set transactions 500
set number 500
run
quit
 
2.2通过blktrace来捕捉postmark的动作
root@f304-PowerEdge-R710:/home/tss/script# ./blktrace.sh postmark
其中blktrace.sh脚本如下
#!/bin/sh
blktrace -d /dev/sdd1 -o -| blkparse -i - -o $1
 
step3:分析blktrace检测结果,得到访问日志区所占访问总量的百分比
blktrace的内容通过脚本分析,提取动作为A的项,并在动作为A的项中统计访问日志区的次数
脚本如下:
#!/bin/sh
awk '{if($6=="A")print ($8-2048)/8;i++}END {print "i="i}' $1>$2
awk '{if(($1>=15761408)&&($1<=15794175)){j++;}}END {print "j="j}' $2
 
其中第一个awk语句把A行所表示的扇区号转化为对应的块号。
其中第二个awk语句根据上述debugfs检查得到的日志区范围进行统计。
 
其中输入文件$1为上述红色标记blktrace捕捉输出文件的名字。
输出文件$2统计动作为A的行,最后一行awk语句记录访问日志区的数目。(通过j= ** 来指示)
由此可以计算出访问日志区占所有访问的比例。(j/i)

 

Category: 文件系统 | Tags: | Read Count: 2800
Avatar_small
전설 서구 说:
2021年3月02日 20:02

Thanks so much for sharing this awesome info! I am looking forward to see more postsby you! 123movies

Avatar_small
CGBSE Model Paper Cl 说:
2022年9月05日 20:06

CG Board Model Paper 2023 Class 12 Pdf Download with Answers for English Medium, Hindi Medium, Urdu Medium & Students for Small Answers, Long Answer, Very Long Answer Questions, and Essay Type Questions to Term1 & Term2 Exams at official website. CGBSE Model Paper Class 12 New Exam Scheme or Question Pattern for Sammittive Assignment Exams (SA1 & SA2): Very Long Answer (VLA), Long Answer (LA), Small Answer (SA), Very Small Answer (VSA), Single Answer, Multiple Choice and etc.

Avatar_small
Creative Agency 说:
2022年11月26日 19:31

Human-centered Design
Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! Keep rocking.

Avatar_small
Creative Agency 说:
2022年11月26日 22:56

The information you have posted is very useful. The sites you referred were good. Thanks for sharing this.

Avatar_small
rhoer jackets 说:
2022年12月17日 18:19

Awesome and interesting article. Great things you've always shared with us. Thanks. Just continue composing this kind of post.

Avatar_small
Alyssa 说:
2023年1月04日 22:00

A log area is defined as an area of a website where users are required to log in. In order to calculate the percentage of log area visits leading specialist in digital marketing to the total visits, we would need to track the number of visitors to both the log area and the total visits of the website. This information can be found through web analytics. Once we have these numbers, we can simply divide the number of log area visits by the total visits to get the desired percentage.

Avatar_small
Website 说:
2023年1月28日 00:47

Buy Instagram pva accounts
Thanks for a wonderful share. Your article has proved the hard work and the experience you have got in this field. Brilliant. I love it reading.

Avatar_small
Website 说:
2023年1月28日 02:43

Gmail PVA accounts
Wow, I can say that this is another great article as expected of this blog. Bookmarked this site.

Avatar_small
Bharat Sanchar Nigam 说:
2023年1月31日 14:56

Fourth Generation BSNL 4G SIM upgradation is now live with simple SMS codes, Find the new technology updates readily available for you to get enhance your technical knowledge with evergreen how-to guides along with new latest updates of Bharat Sanchar Nigam Limited. Bharat Sanchar Nigam Limited BSNL SIM card in this new season along with the existing offers of Bharat Sanchar Nigam Limited, where the operator introduces, free upgradation offer to customers with 4G replacement SIM those who are using 2G or 3G SIMS.

Avatar_small
Website 说:
2023年2月02日 00:54

Buy Instagram PVA Accounts
I am definitely enjoying your website. You definitely have some great insight and great stories.

Avatar_small
Website 说:
2023年2月02日 02:51

Kitchen Remodeling Contractor Saratoga
This is the first time I am visiting here. I found so much interesting stuff in your blog, especially its discussion. From the tons of comments on your articles. I guess I am not the only one having all the enjoyment here! Keep up the good work.

Avatar_small
192.168.1.1 说:
2023年2月02日 21:57

Do you own a router or modem, then you might have heard about the term Internal configuration and router configuration which are very important to do when you first buy a new router or when you have just reset a router. 192.168.1.1 Frankly speaking, there are hundreds of router brands across the world and every one of them has high end router models that have a different configuration process.

Avatar_small
Website 说:
2023年2月06日 01:07

Instagram pva accounts
This is the first time I am visiting here. I found so much interesting stuff in your blog, especially its discussion. From the tons of comments on your articles. I guess I am not the only one having all the enjoyment here! Keep up the good work.

Avatar_small
Website 说:
2023年2月07日 01:43

Buy Gmail PVA Accounts
I was wondering if I could use this write-up on my other website. I will link it back to your website though. Great Thanks.

Avatar_small
Website 说:
2023年2月07日 02:12

Buy Gmail PVA Accounts
I was wondering if I could use this write-up on my other website. I will link it back to your website though. Great Thanks.

Avatar_small
Broadband Connection 说:
2023年2月07日 16:38

ISP provides unlimited calls to any network round the clock in all the BSNL broadband plans over fiber and DSL networks, and Here we update the latest BSNL broadband unlimited plans daily across India as and when the update released for home and business tariff, Broadband Connection So check each plan in detail to opt for best tariff. BSNL broadband plans over DSL and Bharat Fiber (FTTH) technologies are available, we categorize each plan and provide the updated information of all the circles with new plans and tariff.

Avatar_small
Website 说:
2023年2月17日 00:41

Instagram pva accounts
I read that Post and got it fine and informative. Please share more like that.

Avatar_small
Website 说:
2023年2月17日 01:34

Instagram pva accounts
Superbly written article. If only all bloggers offered the same content as you. the internet would be a far better place.

Avatar_small
Website 说:
2023年2月24日 00:11

Water Damage Langley Bc
I think this is an informative post and it is very useful and knowledgeable. Therefore, I would like to thank you for the efforts you have made in writing this article.

Avatar_small
Website 说:
2023年3月20日 01:59

Jamaica all inclusive resorts
Thanks for the post and great tips. Even, I also think that hard work is the most important aspect of getting success.

Avatar_small
Website 说:
2023年4月07日 07:00

retail leasing lawyers
Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts.

Avatar_small
Website 说:
2023年4月17日 00:04

easy passive income
Superbly written article. If only all bloggers offered the same content as you. the internet would be a far better place.

Avatar_small
stealtech 说:
2023年4月24日 17:49

Yes, I am totally agreed with this article and I just want to say that this article is a very nice and very informative article. I will make sure to be reading your blog more. You made a good point but I can't help but wonder. what about the other side? Thanks!

Avatar_small
greentwinkie 说:
2023年4月25日 18:09

I read that Post and got it fine and informative.

Avatar_small
puzzle game 说:
2023年5月12日 01:58

I am very happy to discover your post as it will become on top of my collection of favorite blogs to visit.

Avatar_small
bravotv.com/link act 说:
2023年7月11日 23:16

Bravo TV is one of the most famous pay television networks in the United States. This channel is one of the NBC Universal families and acts as an alternative for Comcast. bravotv.com/link activate code Bravo TV broadcasts worldwide and mostly wants to focus on movies and events. Activation Code is the password for activating the entertainment service. You will be capable of activating your Smart TV using this method.

Avatar_small
KSEEB 10th Class Sy 说:
2023年8月21日 22:56

Karnataka 10th Class Exam date Sheet 2024 available at Official Website, KSEEB Regulates and Supervises the System of Secondary Education in Karnataka State, It Executes and Governs Various Activities that include KSEEB 10th Class Syllabus 2024 Devising of Courses of Study, Prescribing Syllabus,This Karnataka High School Level Exam Appear Every Year More than 45 Laks of Students, Karnataka Secondary Education Students Studying Karnataka Class Revised Syllabus 2024 helps Students to Learn Logic and order and hence,Karnataka Board Class Syllabus 2024 is Designed in Accordance with the NCERT Based Guidelines and helps Students to get an Overview of the Kannada, English Medium All Subject.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter

Host by is-Programmer.com | Power by Chito 1.3.3 beta | Theme: Aeros 2.0 by TheBuckmaker.com