提取TRA文件的TRA配置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了提取TRA文件的TRA配置相关的知识,希望对你有一定的参考价值。

Used to extract the various config parameters from the TRA file
  1. #!/user/bin/perl -w
  2.  
  3. use strict;
  4. use File::Find;
  5.  
  6. my @DIRLIST = ("c:\scratch", "c:\sukanta\scratch");
  7.  
  8. # Returns the SBRRES_* tables, there can be duplicate tokens
  9. sub extract_tra_params {
  10. my %params = ();
  11. # read the input file
  12. open(FILE, $_) or die "Unable to open file $!";
  13. while(<FILE>) {
  14. if (/^(java.heap.size.max)=(.*)$/) {
  15. $params{$1} = $2;
  16. }
  17. elsif (/^(java.heap.size.initial)=(.*)$/) {
  18. $params{$1} = $2;
  19. }
  20. elsif (/^(tibco.deployment)=(.*)$/) {
  21. $params{$1} = $2;
  22. }
  23. elsif (/^(FlowLimit.*)=(.*)$/) {
  24. $params{$1} = $2;
  25. }
  26. elsif (/^(MaxJobs.*)=(.*)$/) {
  27. $params{$1} = $2;
  28. }
  29. elsif (/^(Engine.ThreadCount)=(.*)$/) {
  30. $params{$1} = $2;
  31. }
  32. elsif (/^(java.thread.stack.size)=(.*)$/) {
  33. $params{$1} = $2;
  34. }
  35. elsif (/^(Hawk.Daemon)=(.*)$/) {
  36. $params{$1} = $2;
  37. }
  38. else {
  39. }
  40. }
  41. close(FILE);
  42. return %params;
  43. # find the unique tables
  44. }
  45.  
  46. sub pretty_print {
  47. my $key;
  48. my (%params) = @_;
  49. foreach $key (sort(keys %params)) {
  50. print $params{"tibco.deployment"}, " ", $key, " ", $params{$key}, " ";
  51. }
  52. }
  53.  
  54. #
  55. # This function will be called for each file by the find function
  56. #
  57. sub process_file {
  58. my $fname = $_;
  59. my %params = ();
  60. if (-e $fname && !-d $fname && lc($fname) =~ /.*.tra$/) {
  61. %params = extract_tra_params($fname);
  62. pretty_print(%params);
  63. }
  64. }
  65. find(&process_file, @DIRLIST);

以上是关于提取TRA文件的TRA配置的主要内容,如果未能解决你的问题,请参考以下文章

text Confronto报告anche tra ambienti diversi SE39

数据库使用数据泵迁移遇到LOB字段

谁知道TRA是啥意思吗?

Edge-assisted Tra?ic Engineering and applications in the IoT

Android -- java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack tra

# Jvm 远程调试配置