Lars Berntzon

Lars Berntzon

Tuesday, 04 June 2019 13:56

WhatsWrong

WhatsWrong

usage: ww [-p <percentage>] {ok|fail} file-1 [{ok|fail} file-2] ...

Examines a set of files to find what is significant for ok and failure files
This can for instance be used to check for differences between many machines
in order to find out what is significant for a failure situation. One can for
example use the list of installed rpms of all involved machines. For the machines
where things are ok the list of rpm:s is given to the ok set and for machines where .
the problem occurs, the rpm list is specified for the fail set.
Lines from all files are used and matched with a ok/fail status. If a certain
line occures in both the fail and ok sets it is disgarded. If a line is not found
in one of the sets but in the other then it will be reported as a diff.
A line is considered found in a set only if it is found in all files in the set,
this can how ever be changed with the -p option which specified what percentage of
the files the line must be found in. Default percentage is 100%
The input files does not need to be sorted.
The output from the script will be rows with the set name where the line is unique
followed by the line (colon separated). Each set name is prefixed with a + sign when
the line is unique for this set and a - sign when the line is missing for the set.

Example:

ww -p 70 fail host1.rpmpgs fail host2.rpmpkgs ok host3.rpmpkgs ok host4.rpmpkgs

Will print rpm packages that are installed on at least 70 % of the failing hosts and
not more than 30 % on the ok hosts; or rpm packages that are installed on at least 70 %
of the ok hosts and not more than 30 % on the failing hosts.

Other situation where this command can be useful:
- Comparing system logs from many machines where some machines are having problem.
For the program to work, the files needs to have any unique texts removed like time
stamps, pids and hostnames.
- Checking some text processing programs. In this case, the text files must be processed
in some way, perhaps the set of characters or the set of words are extracted from each
text file.

And by the way. You can use any names for the sets, the names 'ok' and 'fail' are just
examples. You can also use any number of sets. Like:

ww fail host1.rpms fail host2.rpms ok host3.rpms ok host4.rpms random host5.rpms random host6.rpms

Thursday, 13 July 2017 20:14

Knurling Calculator

Knurling Calculator Module

Input

Pitch (knurls per inch or mm)

Pitch length (distance between knurls on the wheel)

Stock Diameter (inch or mm)
Turn stock to diameter (inch or mm)
Information
Pitch Angle

The angle one pitch length represents on the stock

Circumfence Pitch Length

Circumferential pitch length on the stock

Number of marks (uncompensated)

Number of knurling marks if NOT considering the stock diameter

Number of marks (compensated)

Number of knurling marks WHEN considering the stock diameter

Illustrations for the calculations:

Where:

PL = Distance between knurls on knurling wheel
P = Pitch, number of knurls per mm or inch = 1 / P
CL = Circumfence pitch length, distance between knurls as they impress on the stock. This is a longer distance than PL, especially if the stock diameter is smalled compare to the Pitch
D = Diameter of the stock to be knurled
A = Angle on the stock between knurls as the impress on the stock