IT Questions and Answers :)

Wednesday, March 27, 2019

In MYSQL, what is the command used to reload the grant tables?

In MYSQL, what is the command used to reload the grant tables?

  • PRIVILEGES RELOAD;
  • FLUSH PRIVILEGES;
  • RELOAD GRANT;
  • UPDATE PRIVILEGES; 

 

EXPLANATION


Privileges assigned through GRANT option do not need FLUSH PRIVILEGES to take effect - MySQL server will notice these changes and reload the grant tables immediately.
From MySQL documentation:
If you modify the grant tables directly using statements such as INSERT, UPDATE, or DELETE, your changes have no effect on privilege checking until you either restart the server or tell it to reload the tables. If you change the grant tables directly but forget to reload them, your changes have no effect until you restart the server. This may leave you wondering why your changes seem to make no difference! 


To tell the server to reload the grant tables, perform a flush-privileges operation. This can be done by issuing a FLUSH
PRIVILEGES statement or by executing a mysqladmin flush-privileges or mysqladmin reload command.

SOURCE

https://dev.mysql.com/doc/refman/8.0/en/privilege-changes.html
Share:

Tuesday, March 26, 2019

What is the primary difference between LED and an LCD monitor?

What is the primary difference between LED and an LCD monitor?

  • Doesn't last as long as plasma displays
  • screen size
  • Backlighting source
  • price 

 
What is the primary difference between LED and an LCD monitor?

EXPLANATION

LCD
LCD is the abbreviation of Liquid Crystal display. There are two layers of glass in this technology that are joined together with liquid crystals in between. These crystals help pass or block the light. However, crystals do not produce any light and it comes through fluorescent lamps (CCFL) situated at the back of the screen.
LED
The technology in LED TV’s is much the same with the difference being the source of light at the back of the screen. Whereas it is CCFL in the case of LCD, there is Light emitting Diodes (LED’s) in the case of LED TV’s.
http://www.differencebetween.com/difference-between-lcd-and-vs-led-monitor/
http://www.diffen.com/difference/LCD_TV_vs_LED_TV

Share:

Monday, March 25, 2019

Hard links in Linux are directory entries that refer to the same inode number within the same filesystem. What is the minimum link count for a directory name on a Linux system?

Hard links in Linux are directory entries that refer to the same inode number within the same filesystem. What is the minimum link count for a directory name on a Linux system?

  • 4 The directory, a hard link to itself, a hard link to its parent, and hard link from its parent.
  • 3 The directory name itself, a hard link to itself named " ." and the hard link ".." to its parent.
  • 0 Because users cannot hard link additional names to a directory name.
  • 2 The directory name itself, and a hard link to itself (named "."), within the directory. 


EXPLANATION

Users cannot hard link directories:
$ mkdir This_dir
$ ln This_dir That_dir
ln: ‘This_dir’: hard link not allowed for directory
But the system makes two hard links within a directory when it is created.  One of these is named "." and it is a link to the newly created directory itself, so the new directory will have a link count of 2, which is the minimum link count for a directory.
The other is named ".." and it is a link to  the parent directory, and will add to the parent's link count.
$ ls -ild Link.test    ## list "i"node, "l"ong list, for the "d"irectory itself.
ls: cannot access Link.test: No such file or directory
 
$ mkdir Link.test      ## make the directory.

$ ls -ild Link.test   
2238981 drwxr-xr-x 2 dan users 4096 Dec 26 13:53 Link.test
$ #Link count......^ The newly created directory has 2 hard links.
 
$ ls -ild "Link.test"  "Link.test/."  #Quoting not required, but more readable
2238981 drwxr-xr-x 2 dan users 4096 Dec 26 13:53 Link.test
2238981 drwxr-xr-x 2 dan users 4096 Dec 26 13:53 Link.test/.
When making a new directory, the system will also create a link to the parent directory named  ".."
So every time a directory is created, the link count of the parent directory increases by 1.
$ pwd
/home/dan/Test.link.dir




$ ## List inode numbers in a long listing, directory only, for "Link.test" and "Link.test/."

$ ls -ild "Link.test"   "Link.test/."
2238981 drwxr-xr-x 2 dan users 4096 Dec 26 13:53 Link.test
2238981 drwxr-xr-x 2 dan users 4096 Dec 26 13:53 Link.test/.
$ #................^ Link count is 2 for each entry and inode numbers are identical, 2238981.

$ mkdir Link.test/subdir  ## make a subdirectory under "Link.test".

$ ## Now check the link count, including the newly created subdirectory's parent, " .. "

$ ls -ild   "Link.test/"   "Link.test/."   "Link.test/subdir/.."
2238981 drwxr-xr-x 3 dan users 4096 Dec 26 15:55 Link.test/
2238981 drwxr-xr-x 3 dan users 4096 Dec 26 15:55 Link.test/.
2238981 drwxr-xr-x 3 dan users 4096 Dec 26 15:55 Link.test/subdir/..
$ #................^ Link count has increased from 2 to 3 after creating "subdir".
$ #+ The 3 names above, "Link.test", "Link.test/." and "Link.test/subdir/.." reference
$ #+ the same inode, 2238981.  
c.f.  https://www.tldp.org/LDP/gs/node5.html
"... a directory is actually just a file containing information about link-to-inode associations. Also, every directory contains at least two hard links: ``.'' (a link pointing to itself), and ``..'' (a link pointing to the parent directory)."
The root directory of a filesystem does not have a parent directory, so "/" and  "/."  and "/.."  all reference the same inode.  That is, the parent directory of root, "/..", is  "/"
E.g.
$ ls -ild  "/"   "/."   "/.."
2 drwxr-xr-x 32 root root 4096 Oct 26 13:54 /
2 drwxr-xr-x 32 root root 4096 Oct 26 13:54 /.
2 drwxr-xr-x 32 root root 4096 Oct 26 13:54 /..
$ #..........^^ Note that this link count also includes parent references (..) from subdirectories. 

See also:  http://teaching.idallen.com/cst8207/13w/notes/notes/450_file_system.html

SOURCE

https://www.tldp.org/LDP/gs/node5.html
Share:

Friday, March 22, 2019

What is the scripting language that is taking over what Batch and VBS scripts used to do?

What is the scripting language that is taking over what Batch and VBS scripts used to do?

  • Java
  • C++
  • Powershell
  • VBS.Net 

 
What is the scripting language that is taking over what Batch and VBS scripts used to do?

EXPLANATION

First there were batch files, then VBscript (VBS) and now PowerShell. Sure, there have been some others along the way but, for the most part, good ol' batch, VBS and PowerShell have been the mainstays. Over the years, scripts have become not only easier to write but more powerful as well.

Anything that can be done in Batch and VBS scripts can now be done with Powershell, and more!  Check out the Powershell scripting center for numerous scripts to try out and then visit the Active Directory & GPO group to see how many Spiceheads implement them

Share:

You have two very fast servers and need to transfer a 10 Gigabyte file from one server to the other. You have a 10/100 switch to connect these servers. Which of the following transfer time estimates is the most accurate?

You have two very fast servers and need to transfer a 10 Gigabyte file from one server to the other. You have a 10/100 switch to connect these servers. Which of the following transfer time estimates is the most accurate?

  • 15 Seconds
  • 3 Minutes
  • 3 Seconds
  • 15 Minutes 


EXPLANATION

The maximum transfer rate of the switch is 100 megabit per second, not megabyte per second.  Odds are the switch will be the bottleneck between these two servers.  Many people mistakenly think a gigabit switch can transfer one gigabyte per second. 

A 100 Mbps switch will transfer approximately 12.5 Megabytes of information per second. 


1024 * 10 = 10240MB
10240 / 12.5 = 819.2 seconds
819.2 / 60 = 13.65333 minutes.
Round up, and it'll take about 15 minutes.

To do the math Another way
10 GB * 1024 MB/GB = 10240 MB
10240 MB * 8 Bits/Byte = 81920 megabits
81920 megabits / 100 megabits/Second = 819.2 seconds
819.2 seconds / 60 seconds/minute = 13.65 minutes
Share:

Thursday, March 21, 2019

What does a "Framebuffer" do?

What does a "Framebuffer" do?

  • It allows for smoother frame rates whilst in an active remote session by using a portion of RAM
  • It stores an in-memory bitmap for conversion to a video signal that can be displayed
  • It renders bitmap images in a dot matrix data format, displaying a rectangular grid of pixels
  • It stores and displays a graphical image as a rectangular array of pixel colour values. 

What does a "Framebuffer" do?

EXPLANATION

A framebuffer (frame buffer, or sometimes framestore) is a portion of RAM containing a bitmap that drives a video display.
It is a memory buffer containing a complete frame of data. Modern video cards contain framebuffer circuitry in their cores.

SOURCE

https://en.wikipedia.org/wiki/Framebuffer
Share:

Wednesday, March 20, 2019

What settings in VMware would you use to keep VMs together or separate?

What settings in VMware would you use to keep VMs together or separate?

  • VDS
  • Affinity rules
  • NSX
  • Snapshots 

 
What settings in VMware would you use to keep VMs together or separate?

EXPLANATION


An affinity rule is a setting that establishes a relationship between two or more VMware virtual machines (VMs) and hosts.
Affinity rules and anti-affinity rules tell the vSphere hypervisor platform to keep virtual entities together or separated. The rules, which can be applied as either required or preferred, help reduce traffic across networks and keep the virtual workload balanced on available hosts. If two virtual machines communicate frequently and should share a host, the VMware admin can create a VM-VM affinity rule to keep them together. Conversely, if two resource-hungry VMs would tax a host, an anti-affinity rule will keep those VMs from sharing a host.
Affinity rules and anti-affinity rules can be applied between VMs and hosts as well, and a VM can be subject to VM-VM affinity rules and VM-Host affinity rules at the same time. Affinity and anti-affinity rules in a vSphere environment can conflict with one another. For example, two VMs with an anti-affinity relationship may both be linked to a third VM via an affinity rule, but they cannot share a host. Optional affinity rule violation alarms can alert administrators to these events.

SOURCE

https://searchvmware.techtarget.com/definition/affinity-rules
Share:

Popular Posts