听说AWK功能很强,一直不敢去学,感觉复杂,为了找出系统中一个耗时最长的操作,我学习去使用AWK,拼拼也终于能找出,如果各位有更好的方法,欢迎指正。
A03B-fm-1# for i in 0 1 2 3 4 5 6 7 8
> do
> grep 'Upload takes (ms)' PmServer$i.log |awk -F: 'BEGIN{time=0;cont="t"; print "Begin"}{if($3 > time){time = $3;cont=$0}}END{print time "\t" cont "\nEND"}'
> done
Begin
15910 INFO: LTENESIM001-60001-ENodeB322 - Upload Stats CNEOMI NE END. Upload takes (ms): 15910
END
solaris find process which is listening specific port:
#!/bin/bash
pids=$(/usr/bin/ps -ef | sed 1d | awk '{print $2}')
if [ $# -eq 0 ]; then
echo "Enter port you would like to know pid for: "
read ans
else
ans=$1
fi
for f in $pids
do
/usr/proc/bin/pfiles $f 2>/dev/null | /usr/xpg4/bin/grep "port: $ans"
if [ $? -eq 0 ]
then echo $f
fi
done
exit 0
分享到:
相关推荐
Discover lean Python and how to learn just enough to build useful tools Use Python objects, program structure, I/O, modules and more Handle errors and exceptions Test your code Access the Web; do...
Lean Game Development Apply Lean Frameworks to the Process of Game Development 英文无水印原版pdf pdf所有页面使用FoxitReader、PDF-XChangeViewer、SumatraPDF和Firefox测试都可以打开 本资源转载自网络,...
Frame a vision of the problem you're solving and focus your team on the right outcomes Bring the designers' toolkit to the rest of your product team Share your insights with your team much earlier in ...
Lean Game Development Apply Lean Frameworks to the Process of Game Development 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或...
By using rigorous research methods traditionally only found in academia, and making it accessible to industry, our goal is to advance the state of software development and delivery. By helping the ...
The primary objective is to provide consultants and managers with an in-depth look at how production flows and activities can be modeled using this software, particularly in the context of lean ...
And it’s about software engineering, which is usually defined as “the application of engineering principles to the development of software.” What are engineering principles? Well, first, all ...
What we need is a systematic process for quickly vetting product ideas and raising our odds of success. That's the promise of Running Lean. In this inspiring book, Ash Maurya takes you through an ...
per-request systems—and how you can reap the benefits of complex non-blocking through an API that makes the effort easy to understand and adopt. Author Dan Woods—a member of the Ratpack core team—...
Agile methods are displacing traditional, process-heavy project management techniques, and are poised to migrate from software development to the rest of IT, and to the entire enterprise. Agile’s ...
By producing only what is needed, when it is needed, lean manufacturing reduces these inefficiencies, allowing companies to reallocate resources to areas that directly contribute to customer ...
It will teach you how to use it appropriately. Having a jackhammer is great only if you know how to use it properly; otherwise, you are not much better off than someone with a hammer. LINQ is ...
See how Kanban was used to significantly improve time to market and to create a shared focus across marketing, IT, and operations. Each case study comes with illustrations of the Kanban board and ...
This is believed to be a bug in the Windows clipboard and a work around hasn't been found yet. * Asynchronous targets appears to be broken in the current release. * When TDropFileTarget....
This easy to read guide to NoSQL databases provides the type of no-nonsense overview and analysis that you need to learn, including what NoSQL is and which database is right for you. Featuring ...
Do you plan to optimize the customer serivce process and provide value add for your org? Read it